Version: 1.1.1

org.biomoby.shared.event
Class NotificationEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.biomoby.shared.event.NotificationEvent
All Implemented Interfaces:
Serializable

public class NotificationEvent
extends EventObject

An event fired by various Moby components to inform that something has happened. Typical usage is for monitoring access to a Biomoby registry (how many entities to read, and which one was just read).

Each notification event points to its source - this is inherited from a usual Java EventObject. Sometimes, however, the semantics of the source may change to indicate not the event producer but the event initiator (an instance that caused that something had happened that triggered later sending an event).

Additionally, it has its type (an integer value, preferably taken from a list defined in interface Notifier), a message (whose format may be determined by the notification type), and optionally an object with more details (again, its presence or absence may depend on the notification type).

Version:
$Id: NotificationEvent.java,v 1.6 2005/11/06 16:47:11 senger Exp $
Author:
Martin Senger
See Also:
Serialized Form

Constructor Summary
NotificationEvent(Object source)
          Constructor that does not do much.
NotificationEvent(Object source, int type, Object message)
          A usual constructor, setting notification type and a message.
NotificationEvent(Object source, int type, Object message, Object details)
          A full constructor, setting notification type, message, and details.
 
Method Summary
 Object getDetails()
          Return an object with more details about this notification event.
 Object getMessage()
          Return a message associated with this notification event.
 int getType()
          Return a type of this notification event.
 String toString()
           
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotificationEvent

public NotificationEvent(Object source)
Constructor that does not do much.


NotificationEvent

public NotificationEvent(Object source,
                         int type,
                         Object message)
A usual constructor, setting notification type and a message.


NotificationEvent

public NotificationEvent(Object source,
                         int type,
                         Object message,
                         Object details)
A full constructor, setting notification type, message, and details.

Method Detail

getType

public int getType()
Return a type of this notification event.


getMessage

public Object getMessage()
Return a message associated with this notification event.


getDetails

public Object getDetails()
Return an object with more details about this notification event.


toString

public String toString()
Overrides:
toString in class EventObject

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010