org.activiti.engine.delegate.event

## Interface ActivitiEventDispatcher

- All Known Implementing Classes:
    ActivitiEventDispatcherImpl

      public interface ActivitiEventDispatcher

  Dispatcher which allows for adding and removing `ActivitiEventListener`s to the Activiti Engine as well as dispatching `ActivitiEvent` to all the listeners registered.
  Author:
    Frederik Heremans

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    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.
    `boolean` | `isEnabled()`
    `void` | `removeEventListener(ActivitiEventListener listenerToRemove)` Removes the given listener from this dispatcher.
    `void` | `setEnabled(boolean enabled)`

- - ### Method Detail

    - #### addEventListener

          void addEventListener(ActivitiEventListener listenerToAdd)

      Adds an event-listener which will be notified of ALL events by the dispatcher.
      Parameters:
        `listenerToAdd` - the listener to add

    - #### addEventListener

          void addEventListener(ActivitiEventListener listenerToAdd,
                                ActivitiEventType... types)

      Adds an event-listener which will only be notified when an event of the given types occurs.
      Parameters:
        `listenerToAdd` - the listener to add
        `types` - types of events the listener should be notified for

    - #### removeEventListener

          void removeEventListener(ActivitiEventListener 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(ActivitiEvent event)

      Dispatches the given event to any listeners that are registered.
      Parameters:
        `event` - event 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.

Copyright © 2016 Alfresco. All rights reserved.