Record Class NacosA2aRegistryTransportProperties
java.lang.Object
java.lang.Record
io.agentscope.core.nacos.a2a.registry.NacosA2aRegistryTransportProperties
public record NacosA2aRegistryTransportProperties(String transport, String host, int port, String path, boolean supportTls, String protocol, String query)
extends Record
Properties for A2A Transports Endpoint registry to Nacos.
Used to configure A2A Interface(Endpoint) which registers to Nacos, these properties will be merged to `transport`
and `url`. The format is:
[protocol://]host:port[/path][?query].
When protocol is null, protocol will be set to Constants.PROTOCOL_TYPE_HTTP.
When protocol is Constants.PROTOCOL_TYPE_HTTP (including when set by null) and the
supportTls is true, it will determine whether to transform protocol to
Constants.PROTOCOL_TYPE_HTTPS.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Builder forNacosA2aRegistryTransportProperties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder instance forNacosA2aRegistryTransportProperties.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.path()Returns the value of thepathrecord component.intport()Returns the value of theportrecord component.protocol()Returns the value of theprotocolrecord component.query()Returns the value of thequeryrecord component.booleanReturns the value of thesupportTlsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportrecord component.
-
Constructor Details
-
NacosA2aRegistryTransportProperties
public NacosA2aRegistryTransportProperties(String transport, String host, int port, String path, boolean supportTls, String protocol, String query) Creates an instance of aNacosA2aRegistryTransportPropertiesrecord class.- Parameters:
transport- the value for thetransportrecord componenthost- the value for thehostrecord componentport- the value for theportrecord componentpath- the value for thepathrecord componentsupportTls- the value for thesupportTlsrecord componentprotocol- the value for theprotocolrecord componentquery- the value for thequeryrecord component
-
-
Method Details
-
builder
Creates a new builder instance forNacosA2aRegistryTransportProperties.- Returns:
- builder instance
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
transport
Returns the value of thetransportrecord component.- Returns:
- the value of the
transportrecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
supportTls
public boolean supportTls()Returns the value of thesupportTlsrecord component.- Returns:
- the value of the
supportTlsrecord component
-
protocol
Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-