Package org.sensorhub.api.command
Enum Class ICommandStatus.CommandStatusCode
java.lang.Object
java.lang.Enum<ICommandStatus.CommandStatusCode>
org.sensorhub.api.command.ICommandStatus.CommandStatusCode
- All Implemented Interfaces:
Serializable
,Comparable<ICommandStatus.CommandStatusCode>
,Constable
- Enclosing interface:
- ICommandStatus
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe command was accepted by the receiving system.The command was canceled by an authorized user.The command has completed after a successful execution.The command is currently being executed by the receiving system.The command has failed during execution.The command is pending, meaning it has been received by the system but no decision to accept or reject it has been taken.The command was rejected by the receiving system.The command was validated and effectively scheduled by the receiving system.An update to the command was received and accepted. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isFinal()
Returns the enum constant of this class with the specified name.static ICommandStatus.CommandStatusCode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PENDING
The command is pending, meaning it has been received by the system but no decision to accept or reject it has been taken. -
ACCEPTED
The command was accepted by the receiving system. This usually means that the command has passed the first validation steps but note that it can still be rejected later or fail during execution. An estimated execution time can optionally be provided withICommandStatus.getExecutionTime()
-
REJECTED
The command was rejected by the receiving system. It won't be executed at all and the error property provides the reason for the rejection. This is a final state. No further status updates will be sent. -
SCHEDULED
The command was validated and effectively scheduled by the receiving system. When this status code is used, the scheduled execution time must be provided withICommandStatus.getExecutionTime()
.
Note that systems are not required to notify the planned execution time before execution. -
UPDATED
An update to the command was received and accepted. This code must be used if the system supports task updates. See the equivalentACCEPTED
state for other details. -
CANCELED
The command was canceled by an authorized user. This code must be used if the system supports user driven task cancellations. TheREJECTED
state should be used instead if the command was canceled by the receiving system. This is a final state. No further status updates will be sent. -
EXECUTING
The command is currently being executed by the receiving system. The status message can provide more information about the current progress. A system can send several status updates with this code but different time stamps to report progress incrementally (e.g. for multi-stage executions). In particular, the progress percentage and the end of the (estimated) execution time period can be refined in each update. -
FAILED
The command has failed during execution. The error and/or status message provides the reason for failure. This is a final state. No further status updates will be sent. -
COMPLETED
The command has completed after a successful execution. The actual execution time must be provided withICommandStatus.getExecutionTime()
. This is a final state. No further status updates will be sent.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isFinal
public boolean isFinal()- Returns:
- True if this state is final, false otherwise
-