AS AgentScopeAPI 手册 / API Reference

NacosA2aRegistryAutoConfiguration

@AutoConfiguration(before = AgentscopeA2aAutoConfiguration.class) @EnableConfigurationProperties({NacosServerProperties.class, NacosA2aProperties.class}) @ConditionalOnClass(NacosAiService.class) @ConditionalOnProperty( prefix = Constants.NACOS_PREFIX, name = "enabled", havingValue = "true", matchIfMissing = true) public class NacosA2aRegistryAutoConfiguration
源码Source io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:45–74

Nacos A 2 a 注册表 Auto 配置,保存相关配置项。位于 io.agentscope.extensions.a2a.nacos.registry 包。核心成员包括 a2aService、nacosAgentRegistry。

The AutoConfiguration for A2A Nacos registry.

If Nacos Client and A2A Properties bean exist, will autoconfigure AgentRegistry for Nacos A2A Registry.

方法摘要Method Summary

方法Method说明Description
public AiService a2aService(NacosServerProperties nacosServerProperties) throws NacosException
设置a 2 a 服务。
Performs the a 2 a service operation.
public AgentRegistry nacosAgentRegistry(AiService a2aService, NacosA2aProperties nacosA2aProperties)
执行 `nacosAgentRegistry` 方法。
Performs the nacos agent registry operation.

方法详情Method Detail

a2aService

public AiService a2aService(NacosServerProperties nacosServerProperties) throws NacosException

设置a 2 a 服务。

Performs the a 2 a service operation.

参数Parameters
名称Name类型Type说明Description
nacosServerPropertiesNacosServerPropertiesNacos 服务端属性(类型 `NacosServerProperties`)。The nacos server properties.
返回Returns AiService
返回AiService。Returns ai service.
抛出Throws
  • NacosException 可能抛出 `NacosException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:55–59

nacosAgentRegistry

public AgentRegistry nacosAgentRegistry(AiService a2aService, NacosA2aProperties nacosA2aProperties)

执行 nacosAgentRegistry 方法。

Performs the nacos agent registry operation.

参数Parameters
名称Name类型Type说明Description
a2aServiceAiServicea 2 a 服务(类型 `AiService`)。The a 2 a service.
nacosA2aPropertiesNacosA2aPropertiesNacos A 2 a 属性(类型 `NacosA2aProperties`)。The nacos a 2 a properties.
返回Returns AgentRegistry
返回AgentRegistry。Returns agent registry.
源码Source io/agentscope/extensions/a2a/nacos/registry/NacosA2aRegistryAutoConfiguration.java:61–66
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.