Package com.martiansoftware.nailgun
Class NGListeningAddress
java.lang.Object
com.martiansoftware.nailgun.NGListeningAddress
Represents the address on which the Nailgun server listens.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InetAddress
private final int
private final boolean
private final boolean
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionNGListeningAddress
(String localAddress) Constructs a listening address for a local (Unix domain) address.NGListeningAddress
(InetAddress inetAddress, int inetPort) Constructs a listening address for an internet address and port. -
Method Summary
Modifier and TypeMethodDescriptionReturns the listening internet address ifisInetAddress()
returns true.int
Returns the listening internet port ifisInetAddress()
returns true.Returns the listening local address ifisLocalAddress()
returns true.boolean
Returns true if this listening address has an internet address and port.boolean
Returns true if this listening address has a local (Unix domain) address.toString()
-
Field Details
-
isInet
private final boolean isInet -
isLocal
private final boolean isLocal -
inetAddress
-
inetPort
private final int inetPort -
localAddress
-
-
Constructor Details
-
NGListeningAddress
Constructs a listening address for an internet address and port. -
NGListeningAddress
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
Returns the listening internet address ifisInetAddress()
returns true. Otherwise, throws. -
getInetPort
public int getInetPort()Returns the listening internet port ifisInetAddress()
returns true. Otherwise, throws. -
getLocalAddress
Returns the listening local address ifisLocalAddress()
returns true. Otherwise, throws. -
toString
-