Package com.webmethods.rtl.event
Class Event
java.lang.Object
com.webmethods.rtl.event.Event
- All Implemented Interfaces:
IEvent
,Serializable
- Direct Known Subclasses:
HeartbeatEvent
Title:
Description:
Copyright: Copyright (c) 2002
Company: webMethods, Inc.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.webmethods.rtl.event.IEvent
IEvent.IListener, IEvent.ISynchronousListener, IEvent.Listeners, IEvent.QueueListeners, IEvent.SynchronousListeners
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the session ID of the JCR session that was the source of the eventGet the UserData string of the JCR session that was the source of the eventGet the source IP of the user initiating this event if availablefinal long
Gets the timestamp when the event was raised.final VMID
getVMID()
Gets the id of jvm that the event was raised.final boolean
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) toString()
Returns the most derived class name.
-
Constructor Details
-
Event
protected Event()Default ctor. This is a base class and not intented to be instantiated by itself. This implements all the methods in {link #IEvent}. -
Event
Copy ctor. This special ctor allows this base class to copy thetimestamp
andvmid
to another event class. Since both of them are set whenraise()
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.
- Parameters:
another
- the event to copy from
-
-
Method Details
-
raise
public void raise()Description copied from interface:IEvent
Sends the event into the event delivery service to distribute/deliver to listeners. -
getTimestamp
public final long getTimestamp()Description copied from interface:IEvent
Gets the timestamp when the event was raised. The time is the time on the machine that raised the event. In a cluster environment, unless the clocks are synchronized, comparing times between the machines may be meaningless.- Specified by:
getTimestamp
in interfaceIEvent
- Returns:
- the timestamp as the system time obtained with System.currentTimeMillis().
-
getVMID
Description copied from interface:IEvent
Gets the id of jvm that the event was raised. -
isLocalEvent
public final boolean isLocalEvent()Description copied from interface:IEvent
Determines if the event is raised on this JVM.- Specified by:
isLocalEvent
in interfaceIEvent
- Returns:
- true if the
VMID
is the same as the running VM - See Also:
-
getSourceIP
Description copied from interface:IEvent
Get the source IP of the user initiating this event if available- Specified by:
getSourceIP
in interfaceIEvent
-
setSourceIP
-
getJcrSessionID
Description copied from interface:IEvent
Get the session ID of the JCR session that was the source of the event- Specified by:
getJcrSessionID
in interfaceIEvent
-
getJcrSessionUserData
Description copied from interface:IEvent
Get the UserData string of the JCR session that was the source of the event- Specified by:
getJcrSessionUserData
in interfaceIEvent
-
toString
Returns the most derived class name. It is used to provide better information on debug and error log messages.
-