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 Details

    • INSTANCE

      public static final NonCachingDnsResolver 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

      @Nonnull public InetAddress[] resolve(@Nonnull String sHost) throws UnknownHostException
      Specified by:
      resolve in interface org.apache.hc.client5.http.DnsResolver
      Throws:
      UnknownHostException
    • resolveCanonicalHostname

      @Nonnull public String resolveCanonicalHostname(@Nonnull String sHost) throws UnknownHostException
      Specified by:
      resolveCanonicalHostname in interface org.apache.hc.client5.http.DnsResolver
      Throws:
      UnknownHostException