Package org.openhab.core.items.events
Class ItemStateChangedEvent
java.lang.Object
org.openhab.core.events.AbstractEvent
org.openhab.core.items.events.ItemEvent
org.openhab.core.items.events.ItemStateChangedEvent
- All Implemented Interfaces:
Event
- Direct Known Subclasses:
GroupItemStateChangedEvent
ItemStateChangedEvent
s can be used to deliver item state changes through the openHAB event bus. In contrast
to the ItemStateEvent
the ItemStateChangedEvent
is only sent if the state changed. State events must
be created with the ItemEventFactory
.- Author:
- Dennis Nobel - Initial contribution
-
Field Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class org.openhab.core.items.events.ItemEvent
getItemName
Methods inherited from class org.openhab.core.events.AbstractEvent
equals, getPayload, getSource, getTopic, hashCode
-
Field Details
-
TYPE
The item state changed event type. -
itemState
-
oldItemState
-
-
Constructor Details
-
ItemStateChangedEvent
protected ItemStateChangedEvent(String topic, String payload, String itemName, State newItemState, State oldItemState) Constructs a new item state changed event.- Parameters:
topic
- the topicpayload
- the payloaditemName
- the item namenewItemState
- the new item stateoldItemState
- the old item state
-
-
Method Details