Class JebEvent

java.lang.Object
com.pnfsoftware.jeb.core.events.JebEvent
All Implemented Interfaces:
IEvent

public class JebEvent extends Object implements IEvent
The standard JEB engines implementation of the IEvent interface. Plugins should use this class.
  • Field Details

  • Constructor Details

    • JebEvent

      public JebEvent(J type)
      Create an event without attached data and a default source.
      Parameters:
      type - event type
    • JebEvent

      public JebEvent(J type, Object data)
      Create an event with a default event source.
      Parameters:
      type - event type
      data - event data
    • JebEvent

      public JebEvent(J type, Object data, IEventSource source)
      Create an event.
      Parameters:
      type - event type
      data - event data
      source - event source, or null to defer source assignment
  • Method Details

    • getType

      public J getType()
      Get the JEB-specific event type.
      Specified by:
      getType in interface IEvent
      Returns:
      the event type
    • getData

      public Object getData()
      Get the event payload.
      Specified by:
      getData in interface IEvent
      Returns:
      the payload object, or null if none was provided
    • getSource

      public IEventSource getSource()
      Get the event source.
      Specified by:
      getSource in interface IEvent
      Returns:
      the source that emitted or relayed the event, or null if not yet assigned
    • getTimestamp

      public long getTimestamp()
      Get the event creation timestamp.
      Specified by:
      getTimestamp in interface IEvent
      Returns:
      the creation time in milliseconds since the epoch
    • shouldStopPropagation

      public boolean shouldStopPropagation()
      Determine whether propagation should stop after the current listener.
      Specified by:
      shouldStopPropagation in interface IEvent
      Returns:
      true if propagation should stop
    • setStopPropagation

      public void setStopPropagation(boolean stopPropagation)
      Request that propagation stop after the current listener is notified.
      Parameters:
      stopPropagation - true to stop propagation
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object