Package com.helger.httpclient
Class NonCachingDnsResolver
java.lang.Object
com.helger.httpclient.NonCachingDnsResolver
- All Implemented Interfaces:
org.apache.hc.client5.http.DnsResolver
@Immutable
public class NonCachingDnsResolver
extends Object
implements org.apache.hc.client5.http.DnsResolver
A special implementation of
DnsResolver that tries to disable caching
of DNS resolution as much as possible.- Since:
- 8.8.0
- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NonCachingDnsResolverNo need to create more than one instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.xbill.DNS.LookupcreateDefaultLookup(String sHost) static org.xbill.DNS.LookupcreateDefaultLookup(String sHost, int nType) protected org.xbill.DNS.LookupcreateLookup(String sHost) resolveCanonicalHostname(String sHost) resolveExt(String sHost, Consumer<? super org.xbill.DNS.Record> aRecordConsumer) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hc.client5.http.DnsResolver
resolve
-
Field Details
-
INSTANCE
No need to create more than one instance.
-
-
Constructor Details
-
NonCachingDnsResolver
public NonCachingDnsResolver()
-
-
Method Details
-
createDefaultLookup
@Nonnull public static org.xbill.DNS.Lookup createDefaultLookup(@Nonnull String sHost) throws org.xbill.DNS.TextParseException - Throws:
org.xbill.DNS.TextParseException
-
createDefaultLookup
@Nonnull public static org.xbill.DNS.Lookup createDefaultLookup(@Nonnull String sHost, int nType) throws org.xbill.DNS.TextParseException - Throws:
org.xbill.DNS.TextParseException
-
createLookup
@Nonnull protected org.xbill.DNS.Lookup createLookup(@Nonnull String sHost) throws org.xbill.DNS.TextParseException - Throws:
org.xbill.DNS.TextParseException
-
resolveExt
@Nonnull public InetAddress[] resolveExt(@Nonnull String sHost, @Nullable Consumer<? super org.xbill.DNS.Record> aRecordConsumer) throws UnknownHostException - Throws:
UnknownHostException
-
resolve
- Specified by:
resolvein interfaceorg.apache.hc.client5.http.DnsResolver- Throws:
UnknownHostException
-
resolveCanonicalHostname
- Specified by:
resolveCanonicalHostnamein interfaceorg.apache.hc.client5.http.DnsResolver- Throws:
UnknownHostException
-