Interface FlowableEventDispatcher
- All Known Implementing Classes:
FlowableEventDispatcherImpl
public interface FlowableEventDispatcher
Dispatcher which allows for adding and removing
FlowableEventListener s to the Flowable Engine as well as dispatching FlowableEvent to all the listeners registered.- Author:
- Frederik Heremans
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddEventListener(FlowableEventListener listenerToAdd) Adds an event-listener which will be notified of ALL events by the dispatcher.voidaddEventListener(FlowableEventListener listenerToAdd, FlowableEventType... types) Adds an event-listener which will only be notified when an event of the given types occurs.voiddispatchEvent(FlowableEvent event, String engineType) Dispatches the given event to any listeners that are registered.booleanvoidremoveEventListener(FlowableEventListener listenerToRemove) Removes the given listener from this dispatcher.voidsetEnabled(boolean enabled)
-
Method Details
-
addEventListener
Adds an event-listener which will be notified of ALL events by the dispatcher.- Parameters:
listenerToAdd- the listener to add
-
addEventListener
Adds an event-listener which will only be notified when an event of the given types occurs.- Parameters:
listenerToAdd- the listener to addtypes- types of events the listener should be notified for
-
removeEventListener
Removes the given listener from this dispatcher. The listener will no longer be notified, regardless of the type(s) it was registered for in the first place.- Parameters:
listenerToRemove- listener to remove
-
dispatchEvent
Dispatches the given event to any listeners that are registered.- Parameters:
event- event to dispatch.engineType- type of engine to dispatch
-
setEnabled
void setEnabled(boolean enabled) - Parameters:
enabled- true, if event dispatching should be enabled.
-
isEnabled
boolean isEnabled()- Returns:
- true, if event dispatcher is enabled.
-