Top Description Methods
org.apache.hc.client5.http

public Interface DnsResolver

Known Direct Implementers
org.apache.hc.client5.http.SystemDefaultDnsResolver, org.apache.hc.client5.http.impl.InMemoryDnsResolver
Annotations
@Contract
threading:STATELESS
Imports
java.net.InetAddress, .UnknownHostException, org.apache.hc.core5.annotation.Contract, .ThreadingBehavior

Users may implement this interface to override the normal DNS lookup offered by the OS.
Since
4.2

Method Summary

Modifier and TypeMethod and Description
public InetAddress[]

Returns:

The IP address associated to the given host name, or null if the host name is not known by the implementation class.
resolve
(String
The host name to be resolved by this resolver.
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.

public String
resolveCanonicalHostname(String host)

Gets the fully qualified domain name for given host name.

Method Detail

resolveback to summary
public InetAddress[] resolve(String host) throws UnknownHostException

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.

Parameters
host:String

The host name to be resolved by this resolver.

Returns:InetAddress[]

The IP address associated to the given host name, or null if the host name is not known by the implementation class.

See Also
InetAddress
resolveCanonicalHostnameback to summary
public String resolveCanonicalHostname(String host) throws UnknownHostException

Gets the fully qualified domain name for given host name.

Since
5.0