Enum Class TaskState

java.lang.Object
java.lang.Enum<TaskState>
io.github.a2ap.core.model.TaskState
所有已实现的接口:
Serializable, Comparable<TaskState>, Constable

public enum TaskState extends Enum<TaskState>
Enumeration of possible states for a task in the A2A protocol lifecycle. This enum defines all valid states that a task can be in during its execution, from initial submission through completion or termination. The states follow a logical progression and help clients understand the current status of their requests. State transitions typically follow this pattern: SUBMITTED → WORKING → (INPUT_REQUIRED ↔ WORKING) → COMPLETED/FAILED/CANCELED Special states like REJECTED, AUTH_REQUIRED, and UNKNOWN handle exceptional cases in the task lifecycle.
  • 枚举常量详细资料

    • SUBMITTED

      public static final TaskState SUBMITTED
      Task has been submitted but not yet started processing.
    • WORKING

      public static final TaskState WORKING
      Task is currently being processed by the agent.
    • INPUT_REQUIRED

      public static final TaskState INPUT_REQUIRED
      Task execution is paused, waiting for additional input from the client.
    • COMPLETED

      public static final TaskState COMPLETED
      Task has been successfully completed.
    • FAILED

      public static final TaskState FAILED
      Task execution failed due to an error.
    • CANCELED

      public static final TaskState CANCELED
      Task was canceled by client request or system intervention.
    • REJECTED

      public static final TaskState REJECTED
      Task was rejected by the agent (e.g., invalid parameters, unsupported operation).
    • AUTH_REQUIRED

      public static final TaskState AUTH_REQUIRED
      Task requires authentication before it can proceed.
    • UNKNOWN

      public static final TaskState UNKNOWN
      Task state is unknown or could not be determined.
  • 方法详细资料

    • values

      public static TaskState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TaskState 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.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • getValue

      public String getValue()
    • fromValue

      public static TaskState fromValue(String value)