dlab_core.dispatchers¶
Module Contents¶
-
exception
DispatcherExpectedCallableException[source]¶ Bases:
dlab_core.domain.exceptions.DLabExceptionRaised when trying to call non callable object.
-
class
EventDispatcher[source]¶ -
add_listener(self, name, call)[source]¶ Adds an event listener that listens on the specified events.
Parameters: - name (str) – The name of the event to dispatch.
- call (callable) – The passed callable.
:raise DispatcherExpectedCallableException
-
get_listeners(self, name)[source]¶ Gets the list of listeners for a specific event.
Parameters: name (str) – The name of the event to dispatch. :rtype set :return: List of all event listeners selected by event name.
-