Class StreamingJSONRPCRequest<T>
java.lang.Object
org.a2aproject.sdk.jsonrpc.common.wrappers.A2ARequest<T>
org.a2aproject.sdk.jsonrpc.common.wrappers.StreamingJSONRPCRequest<T>
- Type Parameters:
T- the type of the params object for this streaming request
- All Implemented Interfaces:
A2AMessage
- Direct Known Subclasses:
SendStreamingMessageRequest,SubscribeToTaskRequest
public abstract sealed class StreamingJSONRPCRequest<T>
extends A2ARequest<T>
permits SubscribeToTaskRequest, SendStreamingMessageRequest
Base class for JSON-RPC requests that support streaming responses in the A2A Protocol.
This sealed class extends A2ARequest to provide specialized support for
A2A Protocol methods that return streaming responses. Streaming requests enable
server-sent events and real-time updates to be pushed to clients as they occur,
rather than waiting for a complete response.
The A2A Protocol defines two primary streaming operations:
SendStreamingMessageRequest- Stream task execution events in real-timeSubscribeToTaskRequest- Subscribe to events from an existing task
Streaming requests follow the JSON-RPC 2.0 specification structure but the response
is delivered as a stream of StreamingEventKind objects rather than a single
response message.
This class uses a custom deserializer to properly handle polymorphic deserialization of streaming request types.
-
Field Summary
Fields inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2ARequest
id, jsonrpc, method, paramsFields inherited from interface org.a2aproject.sdk.jsonrpc.common.wrappers.A2AMessage
JSONRPC_VERSION -
Method Summary
Methods inherited from class org.a2aproject.sdk.jsonrpc.common.wrappers.A2ARequest
getId, getJsonrpc, getMethod, getParams, validateAndSetJsonParameters