Package wt.events
Interface KeyedEventBranch
- All Known Implementing Classes:
StandardKeyedEventBranch
public interface KeyedEventBranch
An KeyedEventBranch represents a group of events to which listeners may
subscribe. Each KeyedEventBranch is identified by a slash delimited
event key. Listeners may subscribe to events which match this key.
Each instance of KeyedEventBranch is identified by an event key. The root of the event key hierarchy is "*". The root key "*" identifies all events and is implicitly or explicitly included in all event keys. For example, if the set of event keys includes
- "Manager/STARTED/PM"
- "Manager/SHUTDOWN/PM"
- "Manager/STARTED/LockManager"
- "PM/CREATE/Customer"
- "PM/DELETE/Customer"
Level 1: "*"
Level 2: "Manager", "PM"
Level 3: "Manager/STARTED", "Manager/SHUTDOWN", "PM/CREATE", "PM/DELETE"
Level 4: "Manager/STARTED/PM", "Manager/SHUTDOWN/PM", "Manager/STARTED/LockManager",
"PM/CREATE/Customer", "PM/DELETE/Customer"
See the KeyedEventDispatcher for implementation of the Event Key Structure.
Supported API: true
Extendable: true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(KeyedEventListener listener)
Supported API: truevoiddispatchEvent(Object eventObject)
Supported API: truevoiddispatchMultiObjectEvent(Object eventObject)
Supported API: truevoiddispatchVetoableEvent(Object eventObject) Synchronously dispatch event notification to all listeners.voiddispatchVetoableMultiObjectEvent(Object eventObject) Synchronously dispatch event notification to all listeners.voidremoveEventListener(KeyedEventListener listener)
Supported API: true
-
Method Details
-
addEventListener
Supported API: true- Parameters:
listener-
-
removeEventListener
Supported API: true- Parameters:
listener-
-
dispatchEvent
Supported API: true- Parameters:
eventObject-
-
dispatchVetoableEvent
Synchronously dispatch event notification to all listeners.
Supported API: true- Parameters:
eventObject-- Throws:
WTException
-
dispatchMultiObjectEvent
Supported API: true- Parameters:
eventObject-
-
dispatchVetoableMultiObjectEvent
Synchronously dispatch event notification to all listeners.
Supported API: true- Parameters:
eventObject-- Throws:
WTException
-