Record Class Endpoint

java.lang.Object
java.lang.Record
io.kroxylicious.proxy.internal.net.Endpoint
Record Components:
bindingAddress - address of the interface to which the endpoint is bound. Optional.empty() indicates the 'any' address.
port - port number
tls - true if TLS is in use for this endpoint.

public record Endpoint(Optional<String> bindingAddress, int port, boolean tls) extends Record
Represents a network endpoint. Network endpoints accepts Kafka protocol traffic on behalf of a virtual clusters.
  • Constructor Details

    • Endpoint

      public Endpoint(Optional<String> bindingAddress, int port, boolean tls)
      Creates an instance of a Endpoint record class.
      Parameters:
      bindingAddress - the value for the bindingAddress record component
      port - the value for the port record component
      tls - the value for the tls record component
  • Method Details

    • createEndpoint

      public static Endpoint createEndpoint(io.netty.channel.Channel ch, boolean tls)
    • createEndpoint

      public static Endpoint createEndpoint(Optional<String> bindingAddress, int port, boolean tls)
    • createEndpoint

      public static Endpoint createEndpoint(int port, boolean tls)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • bindingAddress

      public Optional<String> bindingAddress()
      Returns the value of the bindingAddress record component.
      Returns:
      the value of the bindingAddress record component
    • port

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

      public boolean tls()
      Returns the value of the tls record component.
      Returns:
      the value of the tls record component