public class SocketAddressImpl extends Object implements SocketAddress
| Constructor and Description |
|---|
SocketAddressImpl(InetSocketAddress address) |
SocketAddressImpl(int port,
String host) |
SocketAddressImpl(String path) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
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. |
InetAddress |
ipAddress() |
boolean |
isDomainSocket() |
boolean |
isInetSocket() |
String |
path() |
int |
port() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdomainSocketAddress, inetSocketAddress, inetSocketAddresspublic SocketAddressImpl(InetSocketAddress address)
public SocketAddressImpl(int port,
String host)
public SocketAddressImpl(String path)
public String path()
path in interface SocketAddressnull for a inet socket address.public String host()
SocketAddressnull.host in interface SocketAddresspublic String hostName()
SocketAddressnull
null.hostName in interface SocketAddresspublic String hostAddress()
SocketAddressnull as a String.
null.hostAddress in interface SocketAddresspublic int port()
port in interface SocketAddress-1 for a domain socketpublic boolean isInetSocket()
isInetSocket in interface SocketAddresstrue for an inet socket addresspublic boolean isDomainSocket()
isDomainSocket in interface SocketAddresstrue for an domain socket addresspublic InetAddress ipAddress()
Copyright © 2021. All rights reserved.