src.listeners module

The Listeners class provides a convenience container for the listeners and callbacks relevant to a given entities pub/sub implementation.

class src.listeners.Listeners(event_bus: EventBus, listeners: List[Tuple[str, Callable[[...], Any]]])

Bases: object

The Listeners class is simply a container for the functions a parent class wishes to associate with an EventBus. It provides no significant architectural benefits, but rather serves to help organize data and simplify the parent’s constructor.

property event_names: List[str]

Returns a list of event names against which listeners are registered.