public class Event extends Object implements IEvent
IEvent.IListener, IEvent.ISynchronousListener, IEvent.Listeners, IEvent.QueueListeners, IEvent.SynchronousListeners
Modifier | Constructor and Description |
---|---|
protected |
Event()
Default ctor.
|
protected |
Event(Event another)
Copy ctor.
|
Modifier and Type | Method and Description |
---|---|
String |
getJcrSessionID()
Get the session ID of the JCR session that was the source of the event
|
String |
getJcrSessionUserData()
Get the UserData string of the JCR session that was the source of the event
|
String |
getSourceIP()
Get the source IP of the user initiating this event if available
|
long |
getTimestamp()
Gets the timestamp when the event was raised.
|
VMID |
getVMID()
Gets the id of jvm that the event was raised.
|
boolean |
isLocalEvent()
Determines if the event is raised on this JVM.
|
void |
raise()
Sends the event into the event delivery service to distribute/deliver to
listeners.
|
void |
setSourceIP(String sourceIP) |
String |
toString()
Returns the most derived class name.
|
protected Event()
protected Event(Event another)
timestamp
and vmid
to another event class. Since both of them are set when
raise()
is called, there is no method to set them other than this ctor.
This is useful when a listener recieves an event and wishes to treat and process the event as a different event or events.
Note: The copied event can not be raised becuse it looks as if the event was raised already.
another
- the event to copy frompublic void raise()
IEvent
public final long getTimestamp()
IEvent
getTimestamp
in interface IEvent
public final VMID getVMID()
IEvent
public final boolean isLocalEvent()
IEvent
isLocalEvent
in interface IEvent
VMID
is the same as the running VMIEvent.getVMID()
public String getSourceIP()
IEvent
getSourceIP
in interface IEvent
public void setSourceIP(String sourceIP)
public String getJcrSessionID()
IEvent
getJcrSessionID
in interface IEvent
public String getJcrSessionUserData()
IEvent
getJcrSessionUserData
in interface IEvent