AS AgentScopeAPI 手册 / API Reference

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
transportString传输层(类型 `String`)。The transport.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:88–91

host

public Builder host(String host)

设置该配置项。

Performs the host operation.

参数Parameters
名称Name类型Type说明Description
hostStringhost(类型 `String`)。The host.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:93–96

port

public Builder port(int port)

设置该配置项。

Performs the port operation.

参数Parameters
名称Name类型Type说明Description
portintport(类型 `int`)。The port.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:98–101

path

public Builder path(String path)

设置路径。

Performs the path operation.

参数Parameters
名称Name类型Type说明Description
pathString路径(类型 `String`)。The path.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:103–106

supportTls

public Builder supportTls(boolean supportTls)

设置该配置项。

Performs the support tls operation.

参数Parameters
名称Name类型Type说明Description
supportTlsbooleansupport Tls(类型 `boolean`)。The support tls.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:108–111

protocol

public Builder protocol(String protocol)

设置协议。

Performs the protocol operation.

参数Parameters
名称Name类型Type说明Description
protocolString协议(类型 `String`)。The protocol.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:113–116

query

public Builder query(String query)

设置查询。

Performs the query operation.

参数Parameters
名称Name类型Type说明Description
queryString查询文本(类型 `String`)。The query.
返回Returns Builder
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:118–121

build

public NacosA2aRegistryTransportProperties build()

构建并返回最终实例。

Creates and returns an instance.

返回Returns NacosA2aRegistryTransportProperties
返回NacosA2aRegistryTransportProperties。Returns nacos a 2 a registry transport properties.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistryTransportProperties.java:123–131
基于官方固定版本源码静态生成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.