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 org.activiti.engine.impl.persistence.entity.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 ActivitiEventDispatcher
enabled
- true, if event dispatching should be enabled.public boolean isEnabled()
isEnabled
in interface ActivitiEventDispatcher
public void addEventListener(ActivitiEventListener listenerToAdd)
ActivitiEventDispatcher
addEventListener
in interface ActivitiEventDispatcher
listenerToAdd
- the listener to addpublic void addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types)
ActivitiEventDispatcher
addEventListener
in interface ActivitiEventDispatcher
listenerToAdd
- the listener to addtypes
- types of events the listener should be notified forpublic void removeEventListener(ActivitiEventListener listenerToRemove)
ActivitiEventDispatcher
removeEventListener
in interface ActivitiEventDispatcher
listenerToRemove
- listener to removepublic void dispatchEvent(ActivitiEvent event)
ActivitiEventDispatcher
dispatchEvent
in interface ActivitiEventDispatcher
event
- event to dispatch.protected org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity extractProcessDefinitionEntityFromEvent(ActivitiEvent event)
event
- Copyright © 2016 Alfresco. All rights reserved.