Class Event

java.lang.Object
com.webmethods.rtl.event.Event
All Implemented Interfaces:
IEvent, Serializable
Direct Known Subclasses:
HeartbeatEvent

public class Event extends Object implements IEvent
Title: Description: Copyright: Copyright (c) 2002 Company: webMethods, Inc.
See Also:
  • 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

      protected Event(Event another)
      Copy ctor. This special ctor allows this base class to copy the 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.

      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.
      Specified by:
      raise in interface IEvent
    • 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 interface IEvent
      Returns:
      the timestamp as the system time obtained with System.currentTimeMillis().
    • getVMID

      public final VMID getVMID()
      Description copied from interface: IEvent
      Gets the id of jvm that the event was raised.
      Specified by:
      getVMID in interface IEvent
      Returns:
      VMID
    • isLocalEvent

      public final boolean isLocalEvent()
      Description copied from interface: IEvent
      Determines if the event is raised on this JVM.
      Specified by:
      isLocalEvent in interface IEvent
      Returns:
      true if the VMID is the same as the running VM
      See Also:
    • getSourceIP

      public String getSourceIP()
      Description copied from interface: IEvent
      Get the source IP of the user initiating this event if available
      Specified by:
      getSourceIP in interface IEvent
    • setSourceIP

      public void setSourceIP(String sourceIP)
    • getJcrSessionID

      public String 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 interface IEvent
    • getJcrSessionUserData

      public String 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 interface IEvent
    • toString

      public String toString()
      Returns the most derived class name. It is used to provide better information on debug and error log messages.
      Overrides:
      toString in class Object
      Returns:
      the most derived class name