Builder
public static class Builder
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:72–132构建器,用于构建并配置目标实例。位于 io.agentscope.extensions.nacos.a2a.registry 包。核心成员包括 transport、host、port、path、supportTls、protocol。
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 transport(String transport) | 设置传输层。 Performs the transport operation. |
public Builder host(String host) | 设置该配置项。 Performs the host operation. |
public Builder port(int port) | 设置该配置项。 Performs the port operation. |
public Builder path(String path) | 设置路径。 Performs the path operation. |
public Builder supportTls(boolean supportTls) | 设置该配置项。 Performs the support tls operation. |
public Builder protocol(String protocol) | 设置协议。 Performs the protocol operation. |
public Builder query(String query) | 设置查询。 Performs the query operation. |
public NacosA2aRegistryTransportProperties build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
transport
public Builder transport(String transport)
设置传输层。
Performs the transport operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | String | 传输层(类型 `String`)。The transport. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:88–91host
public Builder host(String host)
设置该配置项。
Performs the host operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
host | String | host(类型 `String`)。The host. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:93–96port
public Builder port(int port)
设置该配置项。
Performs the port operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
port | int | port(类型 `int`)。The port. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:98–101path
public Builder path(String path)
设置路径。
Performs the path operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:103–106supportTls
public Builder supportTls(boolean supportTls)
设置该配置项。
Performs the support tls operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
supportTls | boolean | support Tls(类型 `boolean`)。The support tls. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:108–111protocol
public Builder protocol(String protocol)
设置协议。
Performs the protocol operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
protocol | String | 协议(类型 `String`)。The protocol. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:113–116query
public Builder query(String query)
设置查询。
Performs the query operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
query | String | 查询文本(类型 `String`)。The query. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:118–121build
public NacosA2aRegistryTransportProperties build()
构建并返回最终实例。
Creates and returns an instance.
NacosA2aRegistryTransportProperties返回NacosA2aRegistryTransportProperties。Returns nacos a 2 a registry transport properties.
源码Source
io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:123–131