Class ScmEventBus

java.lang.Object
sonia.scm.event.ScmEventBus

public abstract class ScmEventBus extends Object
Dispatches events to listeners, and provides ways for listeners to register themselves. The ScmEventBus searches its implementation with the ServiceLoader.
Since:
1.23
See Also:
  • EventBus
  • Constructor Details

    • ScmEventBus

      public ScmEventBus()
  • Method Details

    • getInstance

      public static ScmEventBus getInstance()
      Returns the singleton instance of the ScmEventBus
    • post

      public abstract void post(Object event)
      Post an event through the event bus. All registered subscribers will be notified by the event bus.
      Parameters:
      event - event to send through the event bus
    • register

      public abstract void register(Object subscriber)
      Register all handler methods with the Subscribe annotation as subscriber for the event bus.
    • unregister

      public abstract void unregister(Object subscriber)
      Unregister the given subscriber object from the event bus.