Interface A2ARequestHandler

  • All Implemented Interfaces:

    
    public interface A2ARequestHandler
    
                        

    Handles JSON-RPC requests according to the A2A protocol.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract JSONRPCResponse<?> handleJsonRpc(NonStreamingJSONRPCRequest<?> request) Handle a JSON-RPC request according to the A2A protocol.
      SseEmitter handleJsonRpcStream(StreamingJSONRPCRequest<?> request) Handles a streaming JSON-RPC request using Server-Sent Events (SSE).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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