public class ActivitiEventDispatcherImpl extends Object implements ActivitiEventDispatcher
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
enabled |
protected ActivitiEventSupport |
eventSupport |
| Constructor and Description |
|---|
ActivitiEventDispatcherImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(ActivitiEventListener listenerToAdd)
Adds an event-listener which will be notified of ALL events by the dispatcher.
|
void |
addEventListener(ActivitiEventListener listenerToAdd,
ActivitiEventType... types)
Adds an event-listener which will only be notified when an event of the given types occurs.
|
void |
dispatchEvent(ActivitiEvent event)
Dispatches the given event to any listeners that are registered.
|
protected ProcessDefinitionEntity |
extractProcessDefinitionEntityFromEvent(ActivitiEvent event)
In case no process-context is active, this method attempts to extract a
process-definition based on the event.
|
boolean |
isEnabled() |
void |
removeEventListener(ActivitiEventListener listenerToRemove)
Removes the given listener from this dispatcher.
|
void |
setEnabled(boolean enabled) |
protected ActivitiEventSupport eventSupport
protected boolean enabled
public void setEnabled(boolean enabled)
setEnabled in interface ActivitiEventDispatcherenabled - true, if event dispatching should be enabled.public boolean isEnabled()
isEnabled in interface ActivitiEventDispatcherpublic void addEventListener(ActivitiEventListener listenerToAdd)
ActivitiEventDispatcheraddEventListener in interface ActivitiEventDispatcherlistenerToAdd - the listener to addpublic void addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)
ActivitiEventDispatcheraddEventListener in interface ActivitiEventDispatcherlistenerToAdd - the listener to addtypes - types of events the listener should be notified forpublic void removeEventListener(ActivitiEventListener listenerToRemove)
ActivitiEventDispatcherremoveEventListener in interface ActivitiEventDispatcherlistenerToRemove - listener to removepublic void dispatchEvent(ActivitiEvent event)
ActivitiEventDispatcherdispatchEvent in interface ActivitiEventDispatcherevent - event to dispatch.protected ProcessDefinitionEntity extractProcessDefinitionEntityFromEvent(ActivitiEvent event)
event - Copyright © 2016 Alfresco. All rights reserved.