public interface SocketAddress
inetSocketAddress(int, String) to create an inet socket address and domainSocketAddress(String)
 to create a domain socket address| Modifier 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  nullas a String. | 
| String | hostName()Returns the host name when available or  nullDomain 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 an inet socket address,  hostmust be nonnullandportmust be between0and65536. | 
| boolean | isDomainSocket() | 
| boolean | isInetSocket() | 
| String | path() | 
| int | port() | 
| static SocketAddress | sharedRandomPort(int id,
                String host)Create an inet socket address that binds to a shared random port identified by  id. | 
static SocketAddress sharedRandomPort(int id, String host)
id.
 host string can be a host name or a host address.
 id - the shared random port idhost - the hoststatic SocketAddress inetSocketAddress(int port, String host)
host must be non null and port must be between 0
 and 65536.
 host string can be a host name or a 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 © 2023 Eclipse. All rights reserved.