Interface EventSubscriber

All Known Implementing Classes:
AbstractItemEventSubscriber, AbstractTypedEventSubscriber, EventWebSocketAdapter, SitemapSubscriptionService

@NonNullByDefault public interface EventSubscriber
The EventSubscriber defines the callback interface for receiving events from the openHAB event bus.
Author:
Stefan Bußweiler - Initial contribution
  • Field Details Link icon

  • Method Details Link icon

    • getSubscribedEventTypes Link icon

      Set<String> getSubscribedEventTypes()
      Gets the event types to which the event subscriber is subscribed to.
      Returns:
      subscribed event types (not null)
    • getEventFilter Link icon

      default @Nullable EventFilter getEventFilter()
      Gets an EventFilter in order to receive specific events if the filter applies. If there is no filter all subscribed event types are received.
      Returns:
      the event filter, or null
    • receive Link icon

      void receive(Event event)
      Callback method for receiving Events from the openHAB event bus. This method is called for every event where the event subscriber is subscribed to and the event filter applies.
      Parameters:
      event - the received event (not null)