Interface IEvent

All Superinterfaces:
INotifiable
All Known Implementing Classes:
Event

public interface IEvent extends INotifiable
An interface for Events, which are part of the Command design pattern. Events allows to send asynchronous notifications to multiple subscribed listeners.
See Also:
  • Method Details

    • getName

      String getName()
      Gets the event name.
      Returns:
      the name of the event.
    • getListeners

      List<IEventListener> getListeners()
      Gets all subscribed listeners.
      Returns:
      a list of listeners.
    • addListener

      void addListener(IEventListener listener)
      Adds a listener to receive notifications for this event.
      Parameters:
      listener - the listener reference to add.
    • removeListener

      void removeListener(IEventListener listener)
      Removes a listener, so that it no longer receives notifications for this event.
      Parameters:
      listener - the listener reference to remove.