|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject org.biomoby.shared.event.NotificationEvent
public class NotificationEvent
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).
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 |
---|
public NotificationEvent(Object source)
public NotificationEvent(Object source, int type, Object message)
public NotificationEvent(Object source, int type, Object message, Object details)
Method Detail |
---|
public int getType()
public Object getMessage()
public Object getDetails()
public String toString()
toString
in class EventObject
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |