Class Event<T extends EventListener>

java.lang.Object
com.oorian.messaging.events.Event<T>
Type Parameters:
T - the type of listener that handles this event
Direct Known Subclasses:
ApplicationEvent, ClientEvent, ExtServerEvent, PageEvent, ServerEvent, SessionEvent

public abstract class Event<T extends EventListener> extends Object
Abstract base class for all events in the Oorian event system.

Events represent actions or occurrences that listeners can respond to. Each event type is parameterized with the listener interface it dispatches to. Events support bubbling, where an event propagates up the element hierarchy from child to parent.

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new Event with bubbling enabled by default.
    protected
    Event(boolean bubbles)
    Creates a new Event with the specified bubbling behavior.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether this event bubbles up the element hierarchy.
    abstract void
    dispatchTo(T listener)
    Dispatches this event to the specified listener.

    Methods inherited from class java.lang.Object

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

    • Event

      protected Event()
      Creates a new Event with bubbling enabled by default.
    • Event

      protected Event(boolean bubbles)
      Creates a new Event with the specified bubbling behavior.
      Parameters:
      bubbles - true if this event should bubble up the element hierarchy, false to prevent bubbling
  • Method Details

    • dispatchTo

      public abstract void dispatchTo(T listener)
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Parameters:
      listener - the listener to dispatch this event to
    • bubbles

      public boolean bubbles()
      Returns whether this event bubbles up the element hierarchy.
      Returns:
      true if this event bubbles, false otherwise