Class PageEvent

java.lang.Object
com.oorian.messaging.events.Event<PageEventListener>
com.oorian.messaging.events.server.PageEvent

public class PageEvent extends Event<PageEventListener>
Event dispatched at the page level, typically used for page-scoped notifications.

Page events can be stopped to prevent further propagation to other listeners via the stop() method.

  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    final void
    Dispatches this event to the specified listener.
    int
    Returns the event identifier.
    boolean
    Returns whether this event has been stopped.
    void
    setId(int id)
    Sets the event identifier.
    void
    Stops this event from being dispatched to further listeners.

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

    bubbles

    Methods inherited from class java.lang.Object

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

    • PageEvent

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

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

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

      protected PageEvent(int id, boolean bubbles)
      Creates a new PageEvent 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
    • stop

      public void stop()
      Stops this event from being dispatched to further listeners.
    • getId

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

      public boolean isStopped()
      Returns whether this event has been stopped.
      Returns:
      true if the event has been stopped, false otherwise
    • dispatchTo

      public final void dispatchTo(PageEventListener listener)
      Dispatches this event to the specified listener.

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

      Specified by:
      dispatchTo in class Event<PageEventListener>
      Parameters:
      listener - the listener to dispatch this event to