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.

Methods

Name

Gets the event’s name.

Name() string

  • returns: string - name of the event.

getListeners

Gets all subscribed listeners.

Listeners() []IEventListener

AddListener

Adds a listener to receive notifications for this event.

AddListener(listener IEventListener)

RemoveListener

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

RemoveListener(listener IEventListener)

See also