Class NacosA2aRegistryTransportProperties.Builder
java.lang.Object
io.agentscope.core.nacos.a2a.registry.NacosA2aRegistryTransportProperties.Builder
- Enclosing class:
- NacosA2aRegistryTransportProperties
The Builder for
NacosA2aRegistryTransportProperties.
Provides a fluent API for constructing instances with various configuration options.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a new instance ofNacosA2aRegistryTransportPropertieswith the configured properties.Sets the host address for the A2A endpoint.Sets the path component for the A2A endpoint URL.port(int port) Sets the port number for the A2A endpoint.Sets the protocol for the A2A endpoint (e.g., http, https).Sets the query string for the A2A endpoint URL.supportTls(boolean supportTls) Sets whether the A2A endpoint supports TLS encryption.Sets the transport identifier for the A2A endpoint.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
transport
Sets the transport identifier for the A2A endpoint.- Parameters:
transport- the transport identifier- Returns:
- the builder instance for method chaining
-
host
Sets the host address for the A2A endpoint.- Parameters:
host- the host address- Returns:
- the builder instance for method chaining
-
port
Sets the port number for the A2A endpoint.- Parameters:
port- the port number- Returns:
- the builder instance for method chaining
-
path
Sets the path component for the A2A endpoint URL.- Parameters:
path- the path component- Returns:
- the builder instance for method chaining
-
supportTls
Sets whether the A2A endpoint supports TLS encryption.- Parameters:
supportTls-trueif TLS is supported,falseotherwise- Returns:
- the builder instance for method chaining
-
protocol
Sets the protocol for the A2A endpoint (e.g., http, https).- Parameters:
protocol- the protocol to use- Returns:
- the builder instance for method chaining
-
query
Sets the query string for the A2A endpoint URL.- Parameters:
query- the query string- Returns:
- the builder instance for method chaining
-
build
Builds a new instance ofNacosA2aRegistryTransportPropertieswith the configured properties.Validates that required properties (transport) are not empty.
- Returns:
- a new instance of
NacosA2aRegistryTransportProperties - Throws:
IllegalArgumentException- if transport is empty
-