Class HostAndPort


  • public class HostAndPort
    extends Object
    Represents a host and a port in a convenient package that also accepts a convenient constructor.
    • Constructor Detail

      • HostAndPort

        public HostAndPort​(String host,
                           int port,
                           boolean secure)
        Construct a HostAndPort object.
        Parameters:
        host - the host name
        port - the port number
        secure - does this host require a secure (SSL) connection?
      • HostAndPort

        public HostAndPort​(String host,
                           int port)
      • HostAndPort

        public HostAndPort​(String str)
        Construct a new HostAndPort from a string of the form "host:port".
        Parameters:
        str - string of the form "host:port"
    • Method Detail

      • isSecure

        public boolean isSecure()
      • getHost

        public String getHost()
      • getPort

        public int getPort()