Builder
public static class Builder
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:40–79构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.nacos.a2a.registry 包。核心成员包括 setAsLatest、enabledRegisterEndpoint、overwritePreferredTransport、addTransport、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.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder setAsLatest(boolean setAsLatest) | 设置该配置项。 Sets the as latest. |
public Builder enabledRegisterEndpoint(boolean enabledRegisterEndpoint) | 启用d 注册端点。 Performs the enabled register endpoint operation. |
public Builder overwritePreferredTransport(String overwritePreferredTransport) | 设置该配置项。 Performs the overwrite preferred transport operation. |
public Builder addTransport(NacosA2aRegistryTransportProperties transport) | 添加传输层。 Adds the transport. |
public NacosA2aRegistryProperties build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
setAsLatest
public Builder setAsLatest(boolean setAsLatest)
设置该配置项。
Sets the as latest.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
setAsLatest | boolean | 设置 As Latest(类型 `boolean`)。The set as latest. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:55–58enabledRegisterEndpoint
public Builder enabledRegisterEndpoint(boolean enabledRegisterEndpoint)
启用d 注册端点。
Performs the enabled register endpoint operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enabledRegisterEndpoint | boolean | 已启用注册端点(类型 `boolean`)。The enabled register endpoint. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:60–63overwritePreferredTransport
public Builder overwritePreferredTransport(String overwritePreferredTransport)
设置该配置项。
Performs the overwrite preferred transport operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
overwritePreferredTransport | String | overwrite Preferred 传输层(类型 `String`)。The overwrite preferred transport. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:65–68addTransport
public Builder addTransport(NacosA2aRegistryTransportProperties transport)
添加传输层。
Adds the transport.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | NacosA2aRegistryTransportProperties | 传输层(类型 `NacosA2aRegistryTransportProperties`)。The transport. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:70–73build
public NacosA2aRegistryProperties build()
构建并返回最终实例。
Creates and returns an instance.
NacosA2aRegistryProperties返回NacosA2aRegistryProperties。Returns nacos a 2 a registry properties.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryProperties.java:75–78