Package org.openhab.core.automation
Class RuleStatusInfo
java.lang.Object
org.openhab.core.automation.RuleStatusInfo
This class is used to present status of a rule. The status consists of the following parts:
The main status, a status detail, a string description and the duration (in ms).
- Author:
- Yordan Mihaylov - Initial contribution, Kai Kreuzer - Refactored to match ThingStatusInfo implementation, Robert Delbrück - add duration property
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for deserialization e.g. by Gson.RuleStatusInfo(RuleStatus status) Constructs a status info.RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail) Constructs a status info.RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail, @Nullable String description) Constructs a status info.RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail, @Nullable String description, @Nullable Long duration) Constructs a status info. -
Method Summary
-
Constructor Details
-
RuleStatusInfo
protected RuleStatusInfo()Default constructor for deserialization e.g. by Gson. -
RuleStatusInfo
Constructs a status info.- Parameters:
status- the status
-
RuleStatusInfo
Constructs a status info.- Parameters:
status- the statusstatusDetail- the detail of the status
-
RuleStatusInfo
public RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail, @Nullable String description) Constructs a status info.- Parameters:
status- the statusstatusDetail- the detail of the statusdescription- the description of the status
-
RuleStatusInfo
public RuleStatusInfo(RuleStatus status, RuleStatusDetail statusDetail, @Nullable String description, @Nullable Long duration) Constructs a status info.- Parameters:
status- the statusstatusDetail- the detail of the statusdescription- the description of the statusduration- the duration of the rule execution in milliseconds that led to this status, ornullif not applicable
-
-
Method Details
-
getStatus
Gets the status itself.- Returns:
- the status
-
getStatusDetail
Gets the detail of the status.- Returns:
- the status detail
-
getDescription
Gets the description of the status.- Returns:
- the description
-
getDuration
Gets the duration of the rule execution that led to this status.- Returns:
- the duration in milliseconds, or
nullif not applicable
-
toString
-
hashCode
public int hashCode() -
equals
-