Enum Class TaskState
- All Implemented Interfaces:
Serializable,Comparable<TaskState>,Constable
Task lifecycle states — superset of MCP 2025-11-25 + A2A.
Wire mapping (only the MCP-5 states are visible on the wire):
SUBMITTED → "working" (internal pre-state, never exposed) REJECTED → "failed" AUTH_REQUIRED → "failed" (interrupted, mapped as failure) WORKING → "working" INPUT_REQUIRED → "input-required" COMPLETED → "completed" FAILED → "failed" CANCELLED → "cancelled" UNKNOWN → error (not sent on wire)
See SEP-1686 and A2A Task State
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that authentication is required to proceed. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanTransitionTo(TaskState target) booleanisActive()booleanstatic TaskStateReturns the enum constant of this class with the specified name.static TaskState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUBMITTED
-
REJECTED
-
AUTH_REQUIRED
Indicates that authentication is required to proceed. This is an interrupted state. -
WORKING
-
INPUT_REQUIRED
-
COMPLETED
-
FAILED
-
CANCELLED
-
UNKNOWN
-
-
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
-
canTransitionTo
-
isTerminal
public boolean isTerminal() -
isActive
public boolean isActive()
-