Class ExtServerEvent<T extends ExtServerEventListener>

java.lang.Object
com.oorian.messaging.events.Event<T>
com.oorian.messaging.events.server.ExtServerEvent<T>
Type Parameters:
T - the type of listener that handles this event

public abstract class ExtServerEvent<T extends ExtServerEventListener> extends Event<T>
Abstract base class for extended server events that carry an event ID and source element.

Extended server events are server-originated events that can be dispatched to ExtServerEventListener implementations. They support custom handler methods beyond the standard onEvent(Event) pattern.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new ExtServerEvent with bubbling enabled.
    protected
    ExtServerEvent(boolean bubbles)
    Creates a new ExtServerEvent with the specified bubbling behavior.
    protected
    Creates a new ExtServerEvent with the specified ID.
    protected
    ExtServerEvent(int id, boolean bubbles)
    Creates a new ExtServerEvent with the specified ID and bubbling behavior.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the event identifier.
    Returns the source element that originated this event.
    void
    setId(int id)
    Sets the event identifier.
    void
    Sets the source element that originated this event.

    Methods inherited from class com.oorian.messaging.events.Event

    bubbles, dispatchTo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExtServerEvent

      protected ExtServerEvent()
      Creates a new ExtServerEvent with bubbling enabled.
    • ExtServerEvent

      protected ExtServerEvent(boolean bubbles)
      Creates a new ExtServerEvent with the specified bubbling behavior.
      Parameters:
      bubbles - true if this event should bubble, false otherwise
    • ExtServerEvent

      protected ExtServerEvent(int id)
      Creates a new ExtServerEvent with the specified ID.
      Parameters:
      id - the event identifier
    • ExtServerEvent

      protected ExtServerEvent(int id, boolean bubbles)
      Creates a new ExtServerEvent with the specified ID and bubbling behavior.
      Parameters:
      id - the event identifier
      bubbles - true if this event should bubble, false otherwise
  • Method Details

    • setId

      public void setId(int id)
      Sets the event identifier.
      Parameters:
      id - the event ID
    • setSource

      public void setSource(Element source)
      Sets the source element that originated this event.
      Parameters:
      source - the source element
    • getId

      public int getId()
      Returns the event identifier.
      Returns:
      the event ID
    • getSource

      public Element getSource()
      Returns the source element that originated this event.
      Returns:
      the source element