public interface EventBroker extends Serializable
Modifier and Type | Method and Description |
---|---|
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.
|
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 pathNoEventsAllowedException
- 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 eventCopyright © 2017 Gentics Software. All Rights Reserved.