类 DefaultDispatcher
java.lang.Object
io.github.a2ap.core.server.impl.DefaultDispatcher
- 所有已实现的接口:
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(A2AServer a2aServer, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Constructs a new DefaultDispatcher. -
方法概要
修饰符和类型方法说明dispatch(JSONRPCRequest request) Dispatches a JSON-RPC request for synchronous processing.reactor.core.publisher.Flux<JSONRPCResponse>dispatchStream(JSONRPCRequest request) Dispatches a JSON-RPC request for streaming/asynchronous processing.
-
构造器详细资料
-
DefaultDispatcher
public DefaultDispatcher(A2AServer a2aServer, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Constructs a new DefaultDispatcher.- 参数:
a2aServer- The A2A server instance to delegate operations toobjectMapper- The Jackson ObjectMapper for parameter conversion
-
-
方法详细资料
-
dispatch
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
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
-