Class SendStreamingMessageResponse
java.lang.Object
org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse<StreamingEventKind>
org.a2aproject.sdk.jsonrpc.common.wrappers.SendStreamingMessageResponse
- All Implemented Interfaces:
A2AMessage
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.
-
Field Summary
Fields inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse
error, id, jsonrpc, resultFields inherited from interface org.a2aproject.sdk.jsonrpc.common.wrappers.A2AMessage
JSONRPC_VERSION -
Constructor Summary
ConstructorsConstructorDescriptionSendStreamingMessageResponse(Object id, A2AError error) Constructs error response.SendStreamingMessageResponse(Object id, StreamingEventKind result) Constructs successful response.SendStreamingMessageResponse(String jsonrpc, Object id, StreamingEventKind result, A2AError error) Constructs response with all parameters. -
Method Summary
Methods inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2AResponse
getError, getId, getJsonrpc, getResult
-
Constructor Details
-
SendStreamingMessageResponse
public SendStreamingMessageResponse(String jsonrpc, Object id, StreamingEventKind result, A2AError error) Constructs response with all parameters.- Parameters:
jsonrpc- the JSON-RPC versionid- the request IDresult- the resulterror- the error if any
-
SendStreamingMessageResponse
Constructs successful response.- Parameters:
id- the request IDresult- the result
-
SendStreamingMessageResponse
Constructs error response.- Parameters:
id- the request IDerror- the error
-