public interface SocketAddress
inetSocketAddress(int, String)
to create an inet socket address and domainSocketAddress(String)
to create a domain socket addressModifier and Type | Method and Description |
---|---|
static SocketAddress |
domainSocketAddress(String path)
Create a domain socket address from a
path . |
String |
host()
Returns the host name when available or the IP address in string representation.
|
String |
hostAddress()
Returns the host IP address when available or
null as a String. |
String |
hostName()
Returns the host name when available or
null
Domain socket address returns null . |
static SocketAddress |
inetSocketAddress(InetSocketAddress address)
Create a inet socket address from a Java
InetSocketAddress . |
static SocketAddress |
inetSocketAddress(int port,
String host)
Create a inet socket address,
host must be non null and port must be between 0
and 65536 . |
boolean |
isDomainSocket() |
boolean |
isInetSocket() |
String |
path() |
int |
port() |
static SocketAddress inetSocketAddress(int port, String host)
host
must be non null
and port
must be between 0
and 65536
.
host
string can be an host name or an host address.
port
- the porthost
- the hoststatic SocketAddress domainSocketAddress(String path)
path
.path
- the address pathstatic SocketAddress inetSocketAddress(InetSocketAddress address)
InetSocketAddress
.
address
- the addressString host()
null
.String hostName()
null
null
.String hostAddress()
null
as a String.
null
.int port()
-1
for a domain socketString path()
null
for a inet socket address.boolean isInetSocket()
true
for an inet socket addressboolean isDomainSocket()
true
for an domain socket addressCopyright © 2021 Eclipse. All rights reserved.