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
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
ConstructorsModifierConstructorDescriptionprotectedCreates a new ExtServerEvent with bubbling enabled.protectedExtServerEvent(boolean bubbles) Creates a new ExtServerEvent with the specified bubbling behavior.protectedExtServerEvent(int id) Creates a new ExtServerEvent with the specified ID.protectedExtServerEvent(int id, boolean bubbles) Creates a new ExtServerEvent with the specified ID and bubbling behavior. -
Method Summary
Methods inherited from class com.oorian.messaging.events.Event
bubbles, dispatchTo
-
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-trueif this event should bubble,falseotherwise
-
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 identifierbubbles-trueif this event should bubble,falseotherwise
-
-
Method Details
-
setId
public void setId(int id) Sets the event identifier.- Parameters:
id- the event ID
-
setSource
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
Returns the source element that originated this event.- Returns:
- the source element
-