Package dev.agenor.core
Record Class TransportEndpoint
java.lang.Object
java.lang.Record
dev.agenor.core.TransportEndpoint
- Record Components:
transportType- transport identifier (must match the owning transport implementation)address- transport-specific physical address (node ID for local, stream key for Redis, …)properties- optional transport-specific properties
public record TransportEndpoint(String transportType, String address, Map<String,String> properties)
extends Record
Transport-layer handle used by
MessageTransport.
Agents work with agentId strings. The dispatcher resolves an agent ID to
an AgentEndpoint and then converts it to a TransportEndpoint for the
actual wire operation. This separation keeps agent identifiers stable while allowing
the physical address to change (node restart, migration).
- Since:
- 0.20.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static TransportEndpointCreates a local transport endpoint addressed by agent ID.Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransportTyperecord component.
-
Constructor Details
-
TransportEndpoint
Compact constructor — defensively copiesproperties.
-
-
Method Details
-
local
Creates a local transport endpoint addressed by agent ID.- Parameters:
agentId- the target agent identifier- Returns:
- a local-transport endpoint
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
transportType
Returns the value of thetransportTyperecord component.- Returns:
- the value of the
transportTyperecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-