public class NGListeningAddress extends Object
Constructor and Description |
---|
NGListeningAddress(InetAddress inetAddress,
int inetPort)
Constructs a listening address for an internet address and port.
|
NGListeningAddress(String localAddress)
Constructs a listening address for a local (Unix domain) address.
|
Modifier and Type | Method and Description |
---|---|
InetAddress |
getInetAddress()
Returns the listening internet address if
isInetAddress() returns true. |
int |
getInetPort()
Returns the listening internet port if
isInetAddress() returns true. |
String |
getLocalAddress()
Returns the listening local address if
isLocalAddress() returns true. |
boolean |
isInetAddress()
Returns true if this listening address has an internet address and port.
|
boolean |
isLocalAddress()
Returns true if this listening address has a local (Unix domain) address.
|
static void |
release(String localAddress)
Close any instances of local socket, i.e.
|
String |
toString() |
public NGListeningAddress(InetAddress inetAddress, int inetPort)
public NGListeningAddress(String localAddress)
public boolean isInetAddress()
public boolean isLocalAddress()
public InetAddress getInetAddress()
isInetAddress()
returns true. Otherwise,
throws.public int getInetPort()
isInetAddress()
returns true. Otherwise,
throws.public String getLocalAddress()
isLocalAddress()
returns true. Otherwise,
throws.public static void release(String localAddress)
localAddress
- Copyright © 2024. All rights reserved.