Interface IEvent

All Superinterfaces:
org.pipservices4.components.exec.INotifiable
All Known Implementing Classes:
Event

public interface IEvent extends org.pipservices4.components.exec.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 Summary

    Modifier and Type
    Method
    Description
    void
    Adds a listener to receive notifications for this event.
    Gets all subscribed listeners.
    Gets the event name.
    void
    Removes a listener, so that it no longer receives notifications for this event.

    Methods inherited from interface org.pipservices4.components.exec.INotifiable

    notify
  • 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.