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 Details

    • TransportEndpoint

      public TransportEndpoint(String transportType, String address, Map<String,String> properties)
      Compact constructor — defensively copies properties.
  • Method Details

    • local

      public static TransportEndpoint local(String agentId)
      Creates a local transport endpoint addressed by agent ID.
      Parameters:
      agentId - the target agent identifier
      Returns:
      a local-transport endpoint
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • transportType

      public String transportType()
      Returns the value of the transportType record component.
      Returns:
      the value of the transportType record component
    • address

      public String address()
      Returns the value of the address record component.
      Returns:
      the value of the address record component
    • properties

      public Map<String,String> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component