@Contract(threading=STATELESS)
public interface DnsResolver
| Modifier and Type | Method and Description |
|---|---|
InetAddress[] |
resolve(String host)
Returns the IP address for the specified host name, or null if the given
host is not recognized or the associated IP address cannot be used to
build an InetAddress instance.
|
default List<InetSocketAddress> |
resolve(String host,
int port)
Returns a list of
InetSocketAddress for the given host with the given port. |
String |
resolveCanonicalHostname(String host)
Gets the fully qualified domain name for given host name.
|
InetAddress[] resolve(String host) throws UnknownHostException
host - The host name to be resolved by this resolver.UnknownHostExceptionInetAddressString resolveCanonicalHostname(String host) throws UnknownHostException
UnknownHostExceptiondefault List<InetSocketAddress> resolve(String host, int port) throws UnknownHostException
InetSocketAddress for the given host with the given port.UnknownHostExceptionInetSocketAddressCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.