Builder
public static class Builder
源码Source
io/agentscope/core/a2a/server/transport/TransportProperties.java:39–91构建器,用于构建并配置目标实例。位于 io.agentscope.core.a2a.server.transport 包。核心成员包括 host、port、path、supportTls、extra、build。
A class in io.agentscope.core.a2a.server.transport that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.core.a2a.server.transport.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder host(String host) | 设置该配置项。 Performs the host operation. |
public Builder port(Integer 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 extra(String key, Object value) | 设置该配置项。 Performs the extra operation. |
public Builder extra(Map<String, Object> extra) | 设置该配置项。 Performs the extra operation. |
public TransportProperties build() | 构建并返回最终实例。 Creates and returns an instance. |
方法详情Method Detail
host
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/core/a2a/server/transport/TransportProperties.java:58–61port
public Builder port(Integer port)
设置该配置项。
Performs the port operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
port | Integer | port(类型 `Integer`)。The port. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/transport/TransportProperties.java:63–66path
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/core/a2a/server/transport/TransportProperties.java:68–71supportTls
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/core/a2a/server/transport/TransportProperties.java:73–76extra
public Builder extra(String key, Object value)
设置该配置项。
Performs the extra operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
value | Object | 值(类型 `Object`)。The value. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/transport/TransportProperties.java:78–81extra
public Builder extra(Map<String, Object> extra)
设置该配置项。
Performs the extra operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
extra | Map<String, Object> | extra(类型 `Map`)。The extra. |
Builder返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source
io/agentscope/core/a2a/server/transport/TransportProperties.java:83–86build
public TransportProperties build()
构建并返回最终实例。
Creates and returns an instance.
TransportProperties返回TransportProperties。Returns transport properties.
源码Source
io/agentscope/core/a2a/server/transport/TransportProperties.java:88–90