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

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:
KeyedEventDispatcher, StandardKeyedEventBranch

Field Summary
static String EVENT_CLASS_NAME
          Property name for the event class.
static String EVENT_TYPE
          Property name for the event type.
static String TOSTRING_DELIMITER
          The delimiter for the toString representation.
static String TOSTRING_PREFIX
          The prefix for the toString representation.
 
Method Summary
 void addEventListener(KeyedEventListener listener)
          

Supported API: true
 void dispatchEvent(Object eventObject)
          

Supported API: true
 void dispatchMultiObjectEvent(Object eventObject)
          

Supported API: true
 void dispatchVetoableEvent(Object eventObject)
          Synchronously dispatch event notification to all listeners.
 void dispatchVetoableMultiObjectEvent(Object eventObject)
          Synchronously dispatch event notification to all listeners.
 String getEventClassName()
          Gets the value of the attribute: eventClassName; Return the fully qualified class name for the event, e.g.
 String getEventKey()
          Gets the value of the attribute: eventKey; Return the event key for this branch.
 String getEventType()
          Gets the value of the attribute: eventType; The type of the event, e.g.
 void removeAllEventsListener()
          

Supported API: false
 void removeEventListener(KeyedEventListener listener)
          

Supported API: true
 void setEventClassName(String a_EventClassName)
          Sets the value of the attribute: eventClassName; Return the fully qualified class name for the event, e.g.
 void setEventType(String a_EventType)
          Sets the value of the attribute: eventType; The type of the event, e.g.
 

Field Detail

EVENT_CLASS_NAME

public static final String EVENT_CLASS_NAME
Property name for the event class. May be returned on a PropertyVetoException.

Supported API: false

See Also:
Constant Field Values

EVENT_TYPE

public static final String EVENT_TYPE
Property name for the event type. May be returned on a PropertyVetoException.

Supported API: false

See Also:
Constant Field Values

TOSTRING_PREFIX

public static final String TOSTRING_PREFIX
The prefix for the toString representation.

Supported API: false

See Also:
Constant Field Values

TOSTRING_DELIMITER

public static final String TOSTRING_DELIMITER
The delimiter for the toString representation.

Supported API: false

See Also:
Constant Field Values
Method Detail

getEventKey

public String getEventKey()
Gets the value of the attribute: eventKey; Return the event key for this branch.

Supported API: false

Returns:
String

getEventType

public String getEventType()
Gets the value of the attribute: eventType; The type of the event, e.g. "PRE_DELETE".

Supported API: false

Returns:
String

setEventType

public void setEventType(String a_EventType)
                  throws PropertyVetoException
Sets the value of the attribute: eventType; The type of the event, e.g. "PRE_DELETE".

Supported API: false

Parameters:
a_EventType -
Throws:
PropertyVetoException

getEventClassName

public String getEventClassName()
Gets the value of the attribute: eventClassName; Return the fully qualified class name for the event, e.g. "wt.events.KeyedEvent".

Supported API: false

Returns:
String

setEventClassName

public void setEventClassName(String a_EventClassName)
                       throws PropertyVetoException
Sets the value of the attribute: eventClassName; Return the fully qualified class name for the event, e.g. "wt.events.KeyedEvent".

Supported API: false

Parameters:
a_EventClassName -
Throws:
PropertyVetoException

addEventListener

public void addEventListener(KeyedEventListener listener)


Supported API: true

Parameters:
listener -

removeEventListener

public void removeEventListener(KeyedEventListener listener)


Supported API: true

Parameters:
listener -

removeAllEventsListener

public void removeAllEventsListener()


Supported API: false


dispatchEvent

public void dispatchEvent(Object eventObject)


Supported API: true

Parameters:
eventObject -

dispatchVetoableEvent

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

Supported API: true

Parameters:
eventObject -
Throws:
WTException

dispatchMultiObjectEvent

public void dispatchMultiObjectEvent(Object eventObject)


Supported API: true

Parameters:
eventObject -

dispatchVetoableMultiObjectEvent

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

Supported API: true

Parameters:
eventObject -
Throws:
WTException