Enum Class A2aTaskState
- All Implemented Interfaces:
Serializable,Comparable<A2aTaskState>,Constable
The lifecycle state of a remote A2A task, as defined by the A2A protocol specification v1.0.
A2A 1.0 spells its states TASK_STATE_COMPLETED, where 0.3 used
"completed" and "input-required"; fromWire(java.lang.String) accepts both, because this
enum is read from whatever a remote agent sent and a mixed-version estate is the normal case
during a migration. A state this host does not recognise maps to UNKNOWN rather than
failing, so a caller keeps polling instead of breaking on an agent running a newer spec revision.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic A2aTaskStateMaps a wire value —"TASK_STATE_INPUT_REQUIRED"(1.0) or"input-required"(0.3) — to a state,UNKNOWNfor anything unrecognised (includingnull).booleanWhether the remote task can no longer change state — the caller should stop polling.static A2aTaskStateReturns the enum constant of this class with the specified name.static A2aTaskState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUBMITTED
-
WORKING
-
INPUT_REQUIRED
-
AUTH_REQUIRED
-
COMPLETED
-
FAILED
-
CANCELED
-
REJECTED
-
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
-
isTerminal
public boolean isTerminal()Whether the remote task can no longer change state — the caller should stop polling. -
fromWire
Maps a wire value —"TASK_STATE_INPUT_REQUIRED"(1.0) or"input-required"(0.3) — to a state,UNKNOWNfor anything unrecognised (includingnull).
-