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

public static enum ICommandStatus.CommandStatusCode extends Enum<ICommandStatus.CommandStatusCode>

Status of the command provided by the receiver. Command receivers must be able to report at least FAILED and COMPLETED status, either synchronously or asynchronously. All other codes are optional.

  • Enum Constant Details

    • PENDING

      public static final ICommandStatus.CommandStatusCode 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

      public static final ICommandStatus.CommandStatusCode 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 with ICommandStatus.getExecutionTime()
    • REJECTED

      public static final ICommandStatus.CommandStatusCode 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

      public static final ICommandStatus.CommandStatusCode 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 with ICommandStatus.getExecutionTime().
      Note that systems are not required to notify the planned execution time before execution.
    • UPDATED

      public static final ICommandStatus.CommandStatusCode UPDATED
      An update to the command was received and accepted. This code must be used if the system supports task updates. See the equivalent ACCEPTED state for other details.
    • CANCELED

      public static final ICommandStatus.CommandStatusCode CANCELED
      The command was canceled by an authorized user. This code must be used if the system supports user driven task cancellations. The REJECTED 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

      public static final ICommandStatus.CommandStatusCode 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

      public static final ICommandStatus.CommandStatusCode 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

      public static final ICommandStatus.CommandStatusCode COMPLETED
      The command has completed after a successful execution. The actual execution time must be provided with ICommandStatus.getExecutionTime(). This is a final state. No further status updates will be sent.
  • Method Details

    • values

      public static ICommandStatus.CommandStatusCode[] 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

      public static ICommandStatus.CommandStatusCode valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isFinal

      public boolean isFinal()
      Returns:
      True if this state is final, false otherwise