Record Class NuggetDiscovery.EndpointDescriptor

java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetDiscovery.EndpointDescriptor
Record Components:
transport - logical administration transport or connector kind
scheme - safe endpoint scheme or connector scheme
host - safe host name or classification, empty for local endpoints
port - TCP/UDP port, or -1 when not applicable
localId - safe local endpoint identifier, empty for remote endpoints
Enclosing class:
NuggetDiscovery

public static record NuggetDiscovery.EndpointDescriptor(String transport, String scheme, String host, int port, String localId) extends Record
Safe endpoint descriptor.

The descriptor contains only minimal addressing data. It rejects URI user information, query strings, fragments, blank schemes, invalid ports, and overlong text. Possession of a descriptor is not an admission or authorization credential.

  • Constructor Details

    • EndpointDescriptor

      public EndpointDescriptor(String transport, String scheme, String host, int port, String localId)
      Creates a bounded safe endpoint descriptor.
  • Method Details

    • local

      public static NuggetDiscovery.EndpointDescriptor local(String localId)
      Creates a local connector descriptor.
      Parameters:
      localId - local connector identity
      Returns:
      endpoint descriptor
    • toString

      public String toString()
      Specified by:
      toString in class Record
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • transport

      public String transport()
      Returns the value of the transport record component.
      Returns:
      the value of the transport record component
    • scheme

      public String scheme()
      Returns the value of the scheme record component.
      Returns:
      the value of the scheme record component
    • host

      public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • port

      public int port()
      Returns the value of the port record component.
      Returns:
      the value of the port record component
    • localId

      public String localId()
      Returns the value of the localId record component.
      Returns:
      the value of the localId record component