Package org.openhab.core.items.events
Class ItemStatePredictedEvent
java.lang.Object
org.openhab.core.events.AbstractEvent
org.openhab.core.items.events.ItemEvent
org.openhab.core.items.events.ItemStatePredictedEvent
- All Implemented Interfaces:
Event
This event announces potential item state outcomes when a command was received.
Thereby it denotes that the item state is most likely going to change to the given predicted value.
If isConfirmation == true
, then it basically only confirms the previous item state because a received command
will not be successfully executed and therefore presumably will not result in a state change (e.g. because no handler
currently is capable of delivering such an event to its device).
- Author:
- Simon Kaufmann - Initial contribution
-
Field Summary
-
Constructor Summary
ConstructorDescriptionItemStatePredictedEvent
(String topic, String payload, String itemName, State predictedState, boolean isConfirmation) Constructs a new item state predicted event. -
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 predicted event type. -
predictedState
-
isConfirmation
protected final boolean isConfirmation
-
-
Constructor Details
-
ItemStatePredictedEvent
public ItemStatePredictedEvent(String topic, String payload, String itemName, State predictedState, boolean isConfirmation) Constructs a new item state predicted event.- Parameters:
topic
- the topicpayload
- the payloaditemName
- the item namepredictedState
- the predicted item stateisConfirmation
- the confirmation of previous item state
-
-
Method Details
-
getType
Description copied from interface:Event
Gets the event type.- Returns:
- the event type
-
getPredictedState
Gets the predicted item state.- Returns:
- the predicted item state
-
isConfirmation
public boolean isConfirmation()Gets the confirmation of previous item state.- Returns:
- true, if previous item state is confirmed
-
toString
-