Builder
public static class Builder
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:58–173构建器用于NacosA2aRegistryTransportProperties。位于 io.agentscope.core.nacos.a2a.registry 包。核心成员包括 transport、host、port、path、supportTls、protocol。
The Builder for NacosA2aRegistryTransportProperties.
Provides a fluent API for constructing instances with various configuration options.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder transport(String transport) | 设置传输层。 Sets the transport identifier for the A2A endpoint. |
public Builder host(String host) | 设置该配置项。 Sets the host address for the A2A endpoint. |
public Builder port(int port) | 设置该配置项。 Sets the port number for the A2A endpoint. |
public Builder path(String path) | 设置路径。 Sets the path component for the A2A endpoint URL. |
public Builder supportTls(boolean supportTls) | 设置该配置项。 Sets whether the A2A endpoint supports TLS encryption. |
public Builder protocol(String protocol) | 设置协议。 Sets the protocol for the A2A endpoint (e.g., http, https). |
public Builder query(String query) | 设置查询。 Sets the query string for the A2A endpoint URL. |
public NacosA2aRegistryTransportProperties build() | 构建并返回最终实例。 Builds a new instance of `NacosA2aRegistryTransportProperties` with the configured properties. |
方法详情Method Detail
transport
public Builder transport(String transport)
设置传输层。
Sets the transport identifier for the A2A endpoint.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
transport | String | 传输层(类型 `String`)。the transport identifier |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:87–90host
public Builder host(String host)
设置该配置项。
Sets the host address for the A2A endpoint.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
host | String | host(类型 `String`)。the host address |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:98–101port
public Builder port(int port)
设置该配置项。
Sets the port number for the A2A endpoint.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
port | int | port(类型 `int`)。the port number |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:109–112path
public Builder path(String path)
设置路径。
Sets the path component for the A2A endpoint URL.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。the path component |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:120–123supportTls
public Builder supportTls(boolean supportTls)
设置该配置项。
Sets whether the A2A endpoint supports TLS encryption.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
supportTls | boolean | support Tls(类型 `boolean`)。`true` if TLS is supported, `false` otherwise |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:131–134protocol
public Builder protocol(String protocol)
设置协议。
Sets the protocol for the A2A endpoint (e.g., http, https).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
protocol | String | 协议到使用。the protocol to use |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:142–145query
public Builder query(String query)
设置查询。
Sets the query string for the A2A endpoint URL.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
query | String | 查询文本(类型 `String`)。the query string |
Builderio/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:153–156build
public NacosA2aRegistryTransportProperties build()
构建并返回最终实例。
Builds a new instance of NacosA2aRegistryTransportProperties with the configured properties.
NacosA2aRegistryTransportPropertiesIllegalArgumentException可能抛出 `IllegalArgumentException`。if transport is empty
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:166–172