IEvent

An interface for Events that can send asynchronious notifications to multiple subscribed listeners.

Implements: INotifiable

Description

The IEvent interface allows you to define events that can send asynchronous notifications to multiple subscribed listeners.

Instance methods

get_name

Gets the event name.

get_name(): str

  • returns: str - the name of the event.

get_listeners

Gets all subscribed listeners.

get_listeners(): List[IEventListener]

add_listener

Adds a listener to receive notifications for this event.

add_listener(listener: IEventListener)

remove_listener

Removes a listener, so that it no longer receives notifications for this event.

remove_listener(listener: IEventListener)

See also