Class SendStreamingMessageResponse

java.lang.Object
org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse<StreamingEventKind>
org.a2aproject.sdk.jsonrpc.common.wrappers.SendStreamingMessageResponse
All Implemented Interfaces:
A2AMessage

public final class SendStreamingMessageResponse extends A2AResponse<StreamingEventKind>
JSON-RPC response for streaming message initiation requests.

This response is sent after receiving a SendStreamingMessageRequest and contains a stream of StreamingEventKind events representing the agent's processing progress. Unlike non-streaming responses, this provides real-time updates as the agent works.

The result field contains events such as Task, TaskStatusUpdateEvent, TaskArtifactUpdateEvent, and Message as they are produced by the agent.

If an error occurs during request processing, the error field will be populated with a A2AError instead of streaming events.

See Also:
  • Constructor Details

    • SendStreamingMessageResponse

      public SendStreamingMessageResponse(String jsonrpc, Object id, StreamingEventKind result, A2AError error)
      Constructs response with all parameters.
      Parameters:
      jsonrpc - the JSON-RPC version
      id - the request ID
      result - the result
      error - the error if any
    • SendStreamingMessageResponse

      public SendStreamingMessageResponse(Object id, StreamingEventKind result)
      Constructs successful response.
      Parameters:
      id - the request ID
      result - the result
    • SendStreamingMessageResponse

      public SendStreamingMessageResponse(Object id, A2AError error)
      Constructs error response.
      Parameters:
      id - the request ID
      error - the error