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"
then the event key tree would be as follows:

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 Details

    • addEventListener

      void addEventListener(KeyedEventListener listener)


      Supported API: true
      Parameters:
      listener -
    • removeEventListener

      void removeEventListener(KeyedEventListener listener)


      Supported API: true
      Parameters:
      listener -
    • dispatchEvent

      void dispatchEvent(Object eventObject)


      Supported API: true
      Parameters:
      eventObject -
    • dispatchVetoableEvent

      void dispatchVetoableEvent(Object eventObject) throws WTException
      Synchronously dispatch event notification to all listeners.

      Supported API: true
      Parameters:
      eventObject -
      Throws:
      WTException
    • dispatchMultiObjectEvent

      void dispatchMultiObjectEvent(Object eventObject)


      Supported API: true
      Parameters:
      eventObject -
    • dispatchVetoableMultiObjectEvent

      void dispatchVetoableMultiObjectEvent(Object eventObject) throws WTException
      Synchronously dispatch event notification to all listeners.

      Supported API: true
      Parameters:
      eventObject -
      Throws:
      WTException