NacosAgentRegistry
public class NacosAgentRegistry implements AgentRegistry
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosAgentRegistry.java:45–231Nacos 智能体注册表,支持智能体之间的发现、委派与协作。位于 io.agentscope.extensions.nacos.a2a.registry 包,实现 AgentRegistry。核心成员包括 registryName、register、builder。
The Agent registry for Nacos.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | 构建器,用于构建并配置目标实例。 A class in io.agentscope.extensions.nacos.a2a.registry that supports discovery, delegation and collaboration between agents. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String registryName() | 返回注册表名称。 Returns the registry name. |
public void register(AgentCard agentCard, List<TransportProperties> transportProperties) | 执行注册相关操作。 Performs the register operation. |
public static Builder builder(AiService aiService)static | 返回构建器实例。 Performs the builder operation. |
public static Builder builder(Properties nacosServerProperties) throws NacosExceptionstatic | 返回构建器实例。 Performs the builder operation. |
方法详情Method Detail
registryName
public String registryName()
返回注册表名称。
Returns the registry name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosAgentRegistry.java:60–63register
public void register(AgentCard agentCard, List<TransportProperties> transportProperties)
执行注册相关操作。
Performs the register operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。The agent card. |
transportProperties | List<TransportProperties> | 传输层属性(类型 `List`)。The transport properties. |
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosAgentRegistry.java:65–70builder
public static Builder builder(AiService aiService)
static
返回构建器实例。
Performs the builder operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
aiService | AiService | ai 服务(类型 `AiService`)。The ai service. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosAgentRegistry.java:197–199builder
public static Builder builder(Properties nacosServerProperties) throws NacosException
static
返回构建器实例。
Performs the builder operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
nacosServerProperties | Properties | Nacos 服务端属性(类型 `Properties`)。The nacos server properties. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
NacosException可能抛出 `NacosException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosAgentRegistry.java:201–203嵌套类详情Nested Class Detail
Builder
public static class Builder构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.nacos.a2a.registry 包。核心成员包括 nacosA2aProperties、build。
A class in io.agentscope.extensions.nacos.a2a.registry that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.extensions.nacos.a2a.registry.