Class NGListeningAddress

java.lang.Object
com.martiansoftware.nailgun.NGListeningAddress

public class NGListeningAddress extends Object
Represents the address on which the Nailgun server listens.
  • Field Details

    • isInet

      private final boolean isInet
    • isLocal

      private final boolean isLocal
    • inetAddress

      private final InetAddress inetAddress
    • inetPort

      private final int inetPort
    • localAddress

      private final String localAddress
  • Constructor Details

    • NGListeningAddress

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

      public NGListeningAddress(String localAddress)
      Constructs a listening address for a local (Unix domain) address.
  • Method Details

    • 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 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 String getLocalAddress()
      Returns the listening local address if isLocalAddress() returns true. Otherwise, throws.
    • toString

      public String toString()
      Overrides:
      toString in class Object