Interface EventSource

All Known Subinterfaces:
EventBus
All Known Implementing Classes:
SimpleEventBus

public interface EventSource
A source of events that can be subscribed to.
  • Method Summary

    Modifier and Type Method Description
    void subscribe​(EventHandler listener)
    Subscribes the given listener to events emitted by this source.
    void unsubscribe​(EventHandler listener)
    Unsubscribes the given listener.
  • Method Details

    • subscribe

      void subscribe​(EventHandler listener)
      Subscribes the given listener to events emitted by this source.
      Parameters:
      listener - The listener to be subscribed.
    • unsubscribe

      void unsubscribe​(EventHandler listener)
      Unsubscribes the given listener.
      Parameters:
      listener - The listener to be unsubscribed.