类 DefaultDispatcher

java.lang.Object
io.github.a2ap.core.server.impl.DefaultDispatcher
所有已实现的接口:
Dispatcher

public class DefaultDispatcher extends Object implements Dispatcher
Default implementation of the Dispatcher interface. This implementation routes JSON-RPC requests to the appropriate A2A server methods and handles both synchronous and streaming operations.

Supported methods include: - message/send: Send a message and create a task - message/stream: Send a message and subscribe to streaming updates - tasks/get: Retrieve task information - tasks/cancel: Cancel a running task - tasks/pushNotificationConfig/set: Set push notification configuration - tasks/pushNotificationConfig/get: Get push notification configuration - tasks/resubscribe: Resubscribe to task updates

  • 构造器详细资料

    • DefaultDispatcher

      public DefaultDispatcher(A2AServer a2aServer, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Constructs a new DefaultDispatcher.
      参数:
      a2aServer - The A2A server instance to delegate operations to
      objectMapper - The Jackson ObjectMapper for parameter conversion
  • 方法详细资料

    • dispatch

      public JSONRPCResponse dispatch(JSONRPCRequest request)
      Dispatches a JSON-RPC request for synchronous processing.

      This implementation supports the following methods: - message/send - tasks/get - tasks/cancel - tasks/pushNotificationConfig/set - tasks/pushNotificationConfig/get

      指定者:
      dispatch 在接口中 Dispatcher
      参数:
      request - The JSON-RPC request to be processed
      返回:
      A JSON-RPC response containing the result or error
    • dispatchStream

      public reactor.core.publisher.Flux<JSONRPCResponse> dispatchStream(JSONRPCRequest request)
      Dispatches a JSON-RPC request for streaming/asynchronous processing. This method is used for operations that return multiple responses over time, such as streaming updates or event subscriptions.

      This implementation supports the following streaming methods: - message/stream - tasks/resubscribe

      指定者:
      dispatchStream 在接口中 Dispatcher
      参数:
      request - The JSON-RPC request to be processed
      返回:
      A Flux of JSON-RPC responses for streaming results