Class A2aSendResult

java.lang.Object
com.xebialabs.xlrelease.a2a.api.views.A2aSendResult

public final class A2aSendResult extends Object
The immediate outcome of sending a message to an A2A agent.

An A2A agent may answer a message in two shapes: with a stateful task to be polled (getTaskId() set, state usually non-terminal), or — for quick interactions — with a direct message and no task at all (getTaskId() null, state A2aTaskState.COMPLETED, getText() carrying the answer). Immutable.

  • Constructor Details

    • A2aSendResult

      public A2aSendResult(String taskId, String contextId, A2aTaskState state, String text, Double confidence)
      Parameters:
      taskId - the remote task id to poll, or null when the agent answered directly without creating a task
      contextId - the remote context grouping this exchange, or null
      state - the remote task state at send time; A2aTaskState.COMPLETED for a direct message answer
      text - any text the agent returned immediately, or null
      confidence - the agent's self-reported confidence if it supplied one — also for direct message answers, so an immediate result is policy-evaluated the same way a polled one is; null when not reported
  • Method Details

    • getTaskId

      public String getTaskId()
    • getContextId

      public String getContextId()
    • getState

      public A2aTaskState getState()
    • getText

      public String getText()
    • getConfidence

      public Double getConfidence()