Interface FlowableEventDispatcher
-
public interface FlowableEventDispatcherDispatcher which allows for adding and removingFlowableEventListeners to the Flowable Engine as well as dispatchingFlowableEventto all the listeners registered.- Author:
- Frederik Heremans
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEventListener(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.booleanisEnabled()voidremoveEventListener(FlowableEventListener listenerToRemove)Removes the given listener from this dispatcher.voidsetEnabled(boolean enabled)
-
-
-
Method Detail
-
addEventListener
void addEventListener(FlowableEventListener listenerToAdd)
Adds an event-listener which will be notified of ALL events by the dispatcher.- Parameters:
listenerToAdd- the listener to add
-
addEventListener
void addEventListener(FlowableEventListener listenerToAdd, FlowableEventType... types)
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
void removeEventListener(FlowableEventListener listenerToRemove)
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
void dispatchEvent(FlowableEvent event, String engineType)
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.
-
-