Builder
public static class Builder
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:55–149构建器,用于构建并配置目标实例。位于 io.agentscope.core.a2a.server.request 包。核心成员包括 agentExecutor、taskStore、queueManager、pushConfigStore、pushSender、build。
A class in io.agentscope.core.a2a.server.request that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.core.a2a.server.request.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder agentExecutor(AgentExecutor agentExecutor) | 设置智能体执行器。 Performs the agent executor operation. |
public Builder taskStore(TaskStore taskStore) | 设置任务存储。 Performs the task store operation. |
public Builder queueManager(QueueManager queueManager) | 设置队列管理器。 Performs the queue manager operation. |
public Builder pushConfigStore(PushNotificationConfigStore pushConfigStore) | 设置推送配置存储。 Performs the push config store operation. |
public Builder pushSender(PushNotificationSender pushSender) | 设置该配置项。 Performs the push sender operation. |
public AgentScopeA2aRequestHandler build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
agentExecutor
public Builder agentExecutor(AgentExecutor agentExecutor)
设置智能体执行器。
Performs the agent executor operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentExecutor | AgentExecutor | 智能体执行器(类型 `AgentExecutor`)。The agent executor. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:67–70taskStore
public Builder taskStore(TaskStore taskStore)
设置任务存储。
Performs the task store operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskStore | TaskStore | 任务存储(类型 `TaskStore`)。The task store. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:72–75queueManager
public Builder queueManager(QueueManager queueManager)
设置队列管理器。
Performs the queue manager operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
queueManager | QueueManager | 队列管理器(类型 `QueueManager`)。The queue manager. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:77–80pushConfigStore
public Builder pushConfigStore(PushNotificationConfigStore pushConfigStore)
设置推送配置存储。
Performs the push config store operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pushConfigStore | PushNotificationConfigStore | 推送配置存储(类型 `PushNotificationConfigStore`)。The push config store. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:82–85pushSender
public Builder pushSender(PushNotificationSender pushSender)
设置该配置项。
Performs the push sender operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pushSender | PushNotificationSender | 推送 Sender(类型 `PushNotificationSender`)。The push sender. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:87–90build
public AgentScopeA2aRequestHandler build()
构建并返回最终实例。
Creates and returns an instance.
AgentScopeA2aRequestHandler返回AgentScopeA2aRequestHandler。Returns AgentScope a 2 a request handler.
源码Source
io/agentscope/core/a2a/server/request/AgentScopeA2aRequestHandler.java:92–124