Class HostPort

java.lang.Object
io.deephaven.util.HostPort
All Implemented Interfaces:
Comparable<HostPort>

public class HostPort extends Object implements Comparable<HostPort>
Represents a single endpoint.
  • Field Details

    • host

      public final String host
    • port

      public final int port
  • Constructor Details

    • HostPort

      public HostPort(String host, int port)
      Constructor for a single endpoint
      Parameters:
      host - the host
      port - the port
      Throws:
      IllegalArgumentException - if the host is null
    • HostPort

      public HostPort(String hostPort)
      Constructor for a single endpoint
      Parameters:
      hostPort - a string of the form "host:port" where host is expected to be a valid hostname or a valid ip address, and port is expected to be a valid numeric port.
      Throws:
      IllegalArgumentException - if the provided string cannot be parsed as expected.
  • Method Details