Class HostAndPort


  • public class HostAndPort
    extends java.lang.Object
    This class holds a easy IP/Hostname and port configuration for a server or a client bind address
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String host
      The host address which is configured by the constructors The host string can be a IPv4, IPv6 and a string
      protected int port
      The port is the port, which should the endpoint is bind
    • Constructor Summary

      Constructors 
      Constructor Description
      HostAndPort​(java.lang.String host, int port)  
      HostAndPort​(java.net.InetSocketAddress socketAddress)  
      HostAndPort​(java.net.SocketAddress socketAddress)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHost()  
      int getPort()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • host

        protected java.lang.String host
        The host address which is configured by the constructors The host string can be a IPv4, IPv6 and a string
      • port

        protected int port
        The port is the port, which should the endpoint is bind
    • Constructor Detail

      • HostAndPort

        public HostAndPort​(java.net.InetSocketAddress socketAddress)
      • HostAndPort

        public HostAndPort​(java.net.SocketAddress socketAddress)
      • HostAndPort

        public HostAndPort​(java.lang.String host,
                           int port)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getHost

        public java.lang.String getHost()
      • getPort

        public int getPort()