Builder
public static class Builder
io/agentscope/core/a2a/server/AgentScopeA2aServer.java:188–484构建器,用于构建并配置目标实例。位于 io.agentscope.core.a2a.server 包。核心成员包括 agentCard、withTransport、taskStore、queueManager、pushConfigStore、pushSender。
A class in io.agentscope.core.a2a.server that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.core.a2a.server.
方法摘要Method Summary
方法详情Method Detail
agentCard
public Builder agentCard(ConfigurableAgentCard agentCard)
设置智能体卡片。
Set developer configured agent card.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | ConfigurableAgentCard | 智能体卡片(类型 `ConfigurableAgentCard`)。configured agent card |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:224–227withTransport
public Builder withTransport(TransportProperties transportProperties)
设置使用传输层。
Add supported transport for this A2A server, and input this transport's properties.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transportProperties | TransportProperties | 传输层属性(类型 `TransportProperties`)。properties of supported transport |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:235–238taskStore
public Builder taskStore(TaskStore taskStore)
设置任务存储。
Set implementations of TaskStore.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
taskStore | TaskStore | 任务存储(类型 `TaskStore`)。task store |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:248–251queueManager
public Builder queueManager(QueueManager queueManager)
设置队列管理器。
Set implementations of QueueManager.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
queueManager | QueueManager | 队列管理器(类型 `QueueManager`)。queue manager |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:261–264pushConfigStore
public Builder pushConfigStore(PushNotificationConfigStore pushConfigStore)
设置推送配置存储。
Set implementations of PushNotificationConfigStore.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pushConfigStore | PushNotificationConfigStore | 推送配置存储(类型 `PushNotificationConfigStore`)。push notification config store |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:274–277pushSender
public Builder pushSender(PushNotificationSender pushSender)
设置该配置项。
Set implementations of PushNotificationSender.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pushSender | PushNotificationSender | 推送 Sender(类型 `PushNotificationSender`)。push notification sender |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:287–290executor
public Builder executor(Executor executor)
设置执行器。
Set executor for handle a2a request.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
executor | Executor | 执行器(类型 `Executor`)。executor |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:300–303deploymentProperties
public Builder deploymentProperties(Integer port)
设置部署属性。
Set deployment port to generate default transport interface information in agentCard.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
port | Integer | port(类型 `Integer`)。deployment port |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:311–314deploymentProperties
public Builder deploymentProperties(DeploymentProperties deploymentProperties)
设置部署属性。
Set deployment properties to generate default transport interface information in agentCard.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
deploymentProperties | DeploymentProperties | 部署属性(类型 `DeploymentProperties`)。deployment properties |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:322–325withAgentRegistry
public Builder withAgentRegistry(AgentRegistry agentRegistry)
设置使用智能体注册表。
Add AgentRegistry implementation which should register this agent to registry.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentRegistry | AgentRegistry | 智能体注册表(类型 `AgentRegistry`)。agent registry implementation |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:333–336agentExecuteProperties
public Builder agentExecuteProperties(AgentExecuteProperties agentExecuteProperties)
设置智能体执行属性。
Set agent execute properties.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentExecuteProperties | AgentExecuteProperties | 智能体执行属性(类型 `AgentExecuteProperties`)。agent execute properties |
Builderio/agentscope/core/a2a/server/AgentScopeA2aServer.java:344–347build
public AgentScopeA2aServer build()
构建新的实例的AgentScopeA2aServer。
Build a new instance of AgentScopeA2aServer.
AgentScopeA2aServerIllegalArgumentException可能抛出 `IllegalArgumentException`。if `AgentRunner` is missing or no available transport found.
io/agentscope/core/a2a/server/AgentScopeA2aServer.java:363–418