Class NGListeningAddress


  • public class NGListeningAddress
    extends java.lang.Object
    Represents the address on which the Nailgun server listens.
    • Constructor Summary

      Constructors 
      Constructor Description
      NGListeningAddress​(java.lang.String localAddress)
      Constructs a listening address for a local (Unix domain) address.
      NGListeningAddress​(java.net.InetAddress inetAddress, int inetPort)
      Constructs a listening address for an internet address and port.
    • Field Detail

      • isInet

        private final boolean isInet
      • isLocal

        private final boolean isLocal
      • inetAddress

        private final java.net.InetAddress inetAddress
      • inetPort

        private final int inetPort
      • localAddress

        private final java.lang.String localAddress
    • Constructor Detail

      • NGListeningAddress

        public NGListeningAddress​(java.net.InetAddress inetAddress,
                                  int inetPort)
        Constructs a listening address for an internet address and port.
      • NGListeningAddress

        public NGListeningAddress​(java.lang.String localAddress)
        Constructs a listening address for a local (Unix domain) address.
    • Method Detail

      • isInetAddress

        public boolean isInetAddress()
        Returns true if this listening address has an internet address and port.
      • isLocalAddress

        public boolean isLocalAddress()
        Returns true if this listening address has a local (Unix domain) address.
      • getInetAddress

        public java.net.InetAddress getInetAddress()
        Returns the listening internet address if isInetAddress() returns true. Otherwise, throws.
      • getInetPort

        public int getInetPort()
        Returns the listening internet port if isInetAddress() returns true. Otherwise, throws.
      • getLocalAddress

        public java.lang.String getLocalAddress()
        Returns the listening local address if isLocalAddress() returns true. Otherwise, throws.
      • toString

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