Enum Class A2aTaskState

java.lang.Object
java.lang.Enum<A2aTaskState>
com.xebialabs.xlrelease.a2a.api.views.A2aTaskState
All Implemented Interfaces:
Serializable, Comparable<A2aTaskState>, Constable

public enum A2aTaskState extends Enum<A2aTaskState>
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.

  • Enum Constant Details

  • Method Details

    • values

      public static A2aTaskState[] 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 A2aTaskState 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
    • isTerminal

      public boolean isTerminal()
      Whether the remote task can no longer change state — the caller should stop polling.
    • fromWire

      public static A2aTaskState fromWire(String wireValue)
      Maps a wire value — "TASK_STATE_INPUT_REQUIRED" (1.0) or "input-required" (0.3) — to a state, UNKNOWN for anything unrecognised (including null).