An interface for Events that can send asynchronious notifications to multiple subscribed listeners.
Extends: INotifiable
Description
The IEvent interface allows you to define events that can send asynchronous notifications to multiple subscribed listeners.
Instance methods
getName
Gets the event name.
String getName()
- returns: String - name of the event.
getListeners
Gets all subscribed listeners.
List<IEventListener> getListeners()
- returns: List<IEventListener> - list of listeners.
addListener
Adds a listener to receive notifications for this event.
avoid addListener(IEventListener listener)
- listener: IEventListener - listener reference to add.
removeListener
Removes a listener, so that it no longer receives notifications for this event.
void removeListener(IEventListener listener)
- listener: IEventListener - listener reference to remove.