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

public Class SystemDefaultDnsResolver

extends Object
implements DnsResolver
Class Inheritance
All Implemented Interfaces
org.apache.hc.client5.http.DnsResolver
Imports
java.net.InetAddress, .UnknownHostException

DNS resolver that uses the default OS implementation for resolving host names.
Since
4.2

Field Summary

Modifier and TypeField and Description
public static final SystemDefaultDnsResolver

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public InetAddress[]
resolve(final String
The host name to be resolved by this resolver.
host
)

Implements org.apache.hc.client5.http.DnsResolver.resolve.

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(final String host)

Implements org.apache.hc.client5.http.DnsResolver.resolveCanonicalHostname.

Gets the fully qualified domain name for given host name.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final SystemDefaultDnsResolver INSTANCE

Constructor Detail

SystemDefaultDnsResolverback to summary
public SystemDefaultDnsResolver()

Method Detail

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

Implements org.apache.hc.client5.http.DnsResolver.resolve.

Doc from org.apache.hc.client5.http.DnsResolver.resolve.

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.

Annotations
@Override
resolveCanonicalHostnameback to summary
public String resolveCanonicalHostname(final String host) throws UnknownHostException

Implements org.apache.hc.client5.http.DnsResolver.resolveCanonicalHostname.

Doc from org.apache.hc.client5.http.DnsResolver.resolveCanonicalHostname.

Gets the fully qualified domain name for given host name.

Annotations
@Override