Class SimpleEventBus

java.lang.Object
org.opentcs.util.event.SimpleEventBus
All Implemented Interfaces:
EventBus, EventHandler, EventSource

public class SimpleEventBus extends Object implements EventBus
A plain implementation of EventBus.
  • Constructor Details

    • SimpleEventBus

      public SimpleEventBus()
      Creates a new instance.
  • Method Details

    • onEvent

      public void onEvent(Object event)
      Description copied from interface: EventHandler
      Processes the event object.
      Specified by:
      onEvent in interface EventHandler
      Parameters:
      event - The event object.
    • subscribe

      public void subscribe(EventHandler listener)
      Description copied from interface: EventSource
      Subscribes the given listener to events emitted by this source.
      Specified by:
      subscribe in interface EventSource
      Parameters:
      listener - The listener to be subscribed.
    • unsubscribe

      public void unsubscribe(EventHandler listener)
      Description copied from interface: EventSource
      Unsubscribes the given listener.
      Specified by:
      unsubscribe in interface EventSource
      Parameters:
      listener - The listener to be unsubscribed.