|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventBroker
Interface for an event broker. An event broker is needed for distributing events to registered event handlers.
Method Summary | |
---|---|
void |
addListener(EventHandler handler,
String eventPath)
Add an event handler for the given event path |
void |
addListener(EventHandler handler,
String eventPath,
boolean withPriority)
Add an event handler for the given event path |
void |
addListener(EventHandler handler,
String eventPath,
String Action)
Add an event handler for the given event path and action |
void |
addListener(EventHandler handler,
String eventPath,
String Action,
boolean withPriority)
Add an event handler for the given event path and action |
ActionEvent |
createActionEvent(String actionCommand)
Create an action event |
void |
distributeEvent(ActionEvent e,
String eventPath)
Distribute events to registered event handlers. |
boolean |
isLocked()
Check whether the event broker is locked |
void |
removeListener(EventHandler handler,
String eventPath)
Remove an event handler |
void |
removeListener(EventHandler handler,
String eventPath,
String Action)
Remove an event handler |
void |
setLocked(boolean locked)
Lock/Unlock the event broker. |
Method Detail |
---|
void setLocked(boolean locked)
locked
- true to lock, false to unlockboolean isLocked()
void distributeEvent(ActionEvent e, String eventPath) throws NoEventsAllowedException
e
- event to be distributedeventPath
- event path
NoEventsAllowedException
- when the event broker is lockedvoid addListener(EventHandler handler, String eventPath)
handler
- event handlereventPath
- event path the handler is listening forvoid addListener(EventHandler handler, String eventPath, boolean withPriority)
handler
- event handlereventPath
- event path the handler is listening forwithPriority
- true when the listener shall be added with priority
(means: the listener shall be handled before all other listeners
that are already added)void addListener(EventHandler handler, String eventPath, String Action)
handler
- event handlereventPath
- event path the handler is listening forAction
- actionvoid addListener(EventHandler handler, String eventPath, String Action, boolean withPriority)
handler
- event handlereventPath
- event path the handler is listening forAction
- actionwithPriority
- true when the listener shall be added with priority
(means: the listener shall be handled before all other listeners
that are already added)void removeListener(EventHandler handler, String eventPath)
handler
- event handlereventPath
- event path the handler was listening tovoid removeListener(EventHandler handler, String eventPath, String Action)
handler
- event handlereventPath
- event path the handler was listening toAction
- actionActionEvent createActionEvent(String actionCommand)
actionCommand
- command of the action event
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |