Package com.embabel.agent.a2a.server
Interface A2ARequestHandler
-
- All Implemented Interfaces:
public interface A2ARequestHandlerHandles JSON-RPC requests according to the A2A protocol.
-
-
Method Summary
Modifier and Type Method Description abstract JSONRPCResponse<?>handleJsonRpc(NonStreamingJSONRPCRequest<?> request)Handle a JSON-RPC request according to the A2A protocol. SseEmitterhandleJsonRpcStream(StreamingJSONRPCRequest<?> request)Handles a streaming JSON-RPC request using Server-Sent Events (SSE). -
-
Method Detail
-
handleJsonRpc
abstract JSONRPCResponse<?> handleJsonRpc(NonStreamingJSONRPCRequest<?> request)
Handle a JSON-RPC request according to the A2A protocol.
- Parameters:
request- the JSON-RPC request- Returns:
the JSON-RPC response
-
handleJsonRpcStream
SseEmitter handleJsonRpcStream(StreamingJSONRPCRequest<?> request)
Handles a streaming JSON-RPC request using Server-Sent Events (SSE). This method is called when a client requests a streaming response for methods like "message/stream".
The default implementation throws UnsupportedOperationException as streaming is not supported. Override this method in implementations that support streaming responses.
- Parameters:
request- The JSON-RPC request containing the method name, parameters, and request ID- Returns:
An SseEmitter that will be used to send streaming events to the client
-
-
-
-