Package com.oorian.messaging.events
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
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanbubbles()Returns whether this event bubbles up the element hierarchy.abstract voiddispatchTo(T listener) Dispatches this event to the specified listener.
-
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-trueif this event should bubble up the element hierarchy,falseto prevent bubbling
-
-
Method Details
-
dispatchTo
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:
trueif this event bubbles,falseotherwise
-