Package org.openhab.core.items.events
Class AbstractItemEventSubscriber
java.lang.Object
org.openhab.core.items.events.AbstractItemEventSubscriber
- All Implemented Interfaces:
 EventSubscriber
@NonNullByDefault
public abstract class AbstractItemEventSubscriber
extends Object
implements EventSubscriber
 The AbstractItemEventSubscriber defines an abstract implementation of the EventSubscriber interface
 for receiving ItemStateEvents and ItemCommandEvents from the openHAB event bus.
 A subclass can implement the methods receiveUpdate(ItemStateEvent) and
 receiveCommand(ItemCommandEvent) in order to receive and handle such events.
- Author:
 - Stefan Bußweiler - Initial contribution
 
- 
Field Summary
Fields inherited from interface org.openhab.core.events.EventSubscriber
ALL_EVENT_TYPES - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionGets the event types to which the event subscriber is subscribed to.voidCallback method for receivingEvents from the openHAB event bus.protected voidreceiveCommand(ItemCommandEvent commandEvent) Callback method for receiving item command events from the openHAB event bus.protected voidreceiveTimeSeries(ItemTimeSeriesEvent timeSeriesEvent) Callback method for receiving item timeseries events from the openHAB event bus.protected voidreceiveUpdate(ItemStateEvent updateEvent) Callback method for receiving item update events from the openHAB event bus.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openhab.core.events.EventSubscriber
getEventFilter 
- 
Constructor Details
- 
AbstractItemEventSubscriber
public AbstractItemEventSubscriber() 
 - 
 - 
Method Details
- 
getSubscribedEventTypes
Description copied from interface:EventSubscriberGets the event types to which the event subscriber is subscribed to.- Specified by:
 getSubscribedEventTypesin interfaceEventSubscriber- Returns:
 - subscribed event types (not null)
 
 - 
receive
Description copied from interface:EventSubscriberCallback method for receivingEvents from the openHAB event bus. This method is called for every event where the event subscriber is subscribed to and the event filter applies.- Specified by:
 receivein interfaceEventSubscriber- Parameters:
 event- the received event (not null)
 - 
receiveCommand
Callback method for receiving item command events from the openHAB event bus.- Parameters:
 commandEvent- the item command event
 - 
receiveUpdate
Callback method for receiving item update events from the openHAB event bus.- Parameters:
 updateEvent- the item update event
 - 
receiveTimeSeries
Callback method for receiving item timeseries events from the openHAB event bus.- Parameters:
 timeSeriesEvent- the timeseries event
 
 -