Class DnsNameResolver

java.lang.Object
io.netty.resolver.SimpleNameResolver<InetAddress>
io.netty.resolver.InetNameResolver
io.netty.resolver.dns.DnsNameResolver
All Implemented Interfaces:
io.netty.resolver.NameResolver<InetAddress>, Closeable, AutoCloseable

public class DnsNameResolver extends io.netty.resolver.InetNameResolver
A DNS-based InetNameResolver.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.netty.util.AttributeKey<Boolean>
    An attribute used to mark all channels created by the DnsNameResolver.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DnsNameResolver(io.netty.channel.EventLoop eventLoop, io.netty.channel.ChannelFactory<? extends io.netty.channel.socket.DatagramChannel> channelFactory, DnsCache resolveCache, AuthoritativeDnsServerCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, io.netty.resolver.ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, io.netty.resolver.HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn)
    Deprecated.
    DnsNameResolver(io.netty.channel.EventLoop eventLoop, io.netty.channel.ChannelFactory<? extends io.netty.channel.socket.DatagramChannel> channelFactory, DnsCache resolveCache, DnsCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, io.netty.resolver.ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, io.netty.resolver.HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn)
    Deprecated.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the cache used for authoritative DNS servers for a domain.
    void
    Closes the internal datagram channel used for sending and receiving DNS messages, and clears all DNS resource records from the cache.
    Returns the DnsCnameCache.
    protected void
    doResolve(String inetHost, io.netty.handler.codec.dns.DnsRecord[] additionals, io.netty.util.concurrent.Promise<InetAddress> promise, DnsCache resolveCache)
    Hook designed for extensibility so one can pass a different cache on each resolution attempt instead of using the global one.
    protected void
    doResolve(String inetHost, io.netty.util.concurrent.Promise<InetAddress> promise)
     
    protected void
    doResolveAll(String inetHost, io.netty.handler.codec.dns.DnsRecord[] additionals, io.netty.util.concurrent.Promise<List<InetAddress>> promise, DnsCache resolveCache)
    Hook designed for extensibility so one can pass a different cache on each resolution attempt instead of using the global one.
    protected void
    doResolveAll(String inetHost, io.netty.util.concurrent.Promise<List<InetAddress>> promise)
     
    protected io.netty.channel.EventLoop
     
    io.netty.resolver.HostsFileEntriesResolver
    Returns the component that tries to resolve hostnames against the hosts file prior to asking to remotes DNS servers.
    boolean
    Returns the automatic inclusion of a optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response is enabled.
    boolean
    Returns true if and only if this resolver sends a DNS query with the RD (recursion desired) flag set.
    static boolean
    Returns true if the Throwable was caused by an timeout.
    static boolean
    Returns true if the Throwable was caused by an timeout or transport error.
    int
    Returns the capacity of the datagram packet buffer (in bytes).
    int
    Returns the maximum allowed number of DNS queries to send when resolving a host name.
    Creates a new DnsServerAddressStream to following a redirected DNS query.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(io.netty.handler.codec.dns.DnsQuestion question)
    Sends a DNS query with the specified question.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(io.netty.handler.codec.dns.DnsQuestion question, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
    Sends a DNS query with the specified question.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
    Sends a DNS query with the specified question with additional records.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question)
    Sends a DNS query with the specified question using the specified name server list.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
    Sends a DNS query with the specified question using the specified name server list.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
    Sends a DNS query with the specified question with additional records using the specified name server list.
    io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>>
    query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
    Sends a DNS query with the specified question with additional records using the specified name server list.
    long
    Returns the timeout of each DNS query performed by this resolver (in milliseconds).
    final io.netty.util.concurrent.Future<InetAddress>
    resolve(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
    Resolves the specified name into an address.
    final io.netty.util.concurrent.Future<InetAddress>
    resolve(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<InetAddress> promise)
    Resolves the specified name into an address.
    final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>>
    resolveAll(io.netty.handler.codec.dns.DnsQuestion question)
    Resolves the DnsRecords that are matched by the specified DnsQuestion.
    final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>>
    resolveAll(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
    Resolves the DnsRecords that are matched by the specified DnsQuestion.
    final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>>
    resolveAll(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<List<io.netty.handler.codec.dns.DnsRecord>> promise)
    Resolves the DnsRecords that are matched by the specified DnsQuestion.
    final io.netty.util.concurrent.Future<List<InetAddress>>
    resolveAll(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
    Resolves the specified host name and port into a list of address.
    final io.netty.util.concurrent.Future<List<InetAddress>>
    resolveAll(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<List<InetAddress>> promise)
    Resolves the specified host name and port into a list of address.
    Returns the resolution cache.
    io.netty.resolver.ResolvedAddressTypes
    Returns the ResolvedAddressTypes resolved by SimpleNameResolver.resolve(String).

    Methods inherited from class io.netty.resolver.InetNameResolver

    asAddressResolver

    Methods inherited from class io.netty.resolver.SimpleNameResolver

    resolve, resolve, resolveAll, resolveAll

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DNS_PIPELINE_ATTRIBUTE

      public static final io.netty.util.AttributeKey<Boolean> DNS_PIPELINE_ATTRIBUTE
      An attribute used to mark all channels created by the DnsNameResolver.
  • Constructor Details

    • DnsNameResolver

      @Deprecated public DnsNameResolver(io.netty.channel.EventLoop eventLoop, io.netty.channel.ChannelFactory<? extends io.netty.channel.socket.DatagramChannel> channelFactory, DnsCache resolveCache, DnsCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, io.netty.resolver.ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, io.netty.resolver.HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn)
      Deprecated.
      Creates a new DNS-based name resolver that communicates with the specified list of DNS servers.
      Parameters:
      eventLoop - the EventLoop which will perform the communication with the DNS servers
      channelFactory - the ChannelFactory that will create a DatagramChannel
      resolveCache - the DNS resolved entries cache
      authoritativeDnsServerCache - the cache used to find the authoritative DNS server for a domain
      dnsQueryLifecycleObserverFactory - used to generate new instances of DnsQueryLifecycleObserver which can be used to track metrics for DNS servers.
      queryTimeoutMillis - timeout of each DNS query in millis. 0 disables the timeout. If not set or a negative number is set, the default timeout is used.
      resolvedAddressTypes - the preferred address types
      recursionDesired - if recursion desired flag must be set
      maxQueriesPerResolve - the maximum allowed number of DNS queries for a given name resolution
      traceEnabled - if trace is enabled
      maxPayloadSize - the capacity of the datagram packet buffer
      optResourceEnabled - if automatic inclusion of a optional records is enabled
      hostsFileEntriesResolver - the HostsFileEntriesResolver used to check for local aliases
      dnsServerAddressStreamProvider - The DnsServerAddressStreamProvider used to determine the name servers for each hostname lookup.
      searchDomains - the list of search domain (can be null, if so, will try to default to the underlying platform ones)
      ndots - the ndots value
      decodeIdn - true if domain / host names should be decoded to unicode when received. See rfc3492.
    • DnsNameResolver

      @Deprecated public DnsNameResolver(io.netty.channel.EventLoop eventLoop, io.netty.channel.ChannelFactory<? extends io.netty.channel.socket.DatagramChannel> channelFactory, DnsCache resolveCache, AuthoritativeDnsServerCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, io.netty.resolver.ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, io.netty.resolver.HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn)
      Deprecated.
      Creates a new DNS-based name resolver that communicates with the specified list of DNS servers.
      Parameters:
      eventLoop - the EventLoop which will perform the communication with the DNS servers
      channelFactory - the ChannelFactory that will create a DatagramChannel
      resolveCache - the DNS resolved entries cache
      authoritativeDnsServerCache - the cache used to find the authoritative DNS server for a domain
      dnsQueryLifecycleObserverFactory - used to generate new instances of DnsQueryLifecycleObserver which can be used to track metrics for DNS servers.
      queryTimeoutMillis - timeout of each DNS query in millis. 0 disables the timeout. If not set or a negative number is set, the default timeout is used.
      resolvedAddressTypes - the preferred address types
      recursionDesired - if recursion desired flag must be set
      maxQueriesPerResolve - the maximum allowed number of DNS queries for a given name resolution
      traceEnabled - if trace is enabled
      maxPayloadSize - the capacity of the datagram packet buffer
      optResourceEnabled - if automatic inclusion of a optional records is enabled
      hostsFileEntriesResolver - the HostsFileEntriesResolver used to check for local aliases
      dnsServerAddressStreamProvider - The DnsServerAddressStreamProvider used to determine the name servers for each hostname lookup.
      searchDomains - the list of search domain (can be null, if so, will try to default to the underlying platform ones)
      ndots - the ndots value
      decodeIdn - true if domain / host names should be decoded to unicode when received. See rfc3492.
  • Method Details

    • newRedirectDnsServerStream

      protected DnsServerAddressStream newRedirectDnsServerStream(String hostname, List<InetSocketAddress> nameservers)
      Creates a new DnsServerAddressStream to following a redirected DNS query. By overriding this it provides the opportunity to sort the name servers before following a redirected DNS query.
      Parameters:
      hostname - the hostname.
      nameservers - The addresses of the DNS servers which are used in the event of a redirect. This may contain resolved and unresolved addresses so the used DnsServerAddressStream must allow unresolved addresses if you want to include these as well.
      Returns:
      A DnsServerAddressStream which will be used to follow the DNS redirect or null if none should be followed.
    • resolveCache

      public DnsCache resolveCache()
      Returns the resolution cache.
    • cnameCache

      public DnsCnameCache cnameCache()
      Returns the DnsCnameCache.
    • authoritativeDnsServerCache

      public AuthoritativeDnsServerCache authoritativeDnsServerCache()
      Returns the cache used for authoritative DNS servers for a domain.
    • queryTimeoutMillis

      public long queryTimeoutMillis()
      Returns the timeout of each DNS query performed by this resolver (in milliseconds). The default value is 5 seconds.
    • resolvedAddressTypes

      public io.netty.resolver.ResolvedAddressTypes resolvedAddressTypes()
      Returns the ResolvedAddressTypes resolved by SimpleNameResolver.resolve(String). The default value depends on the value of the system property "java.net.preferIPv6Addresses".
    • isRecursionDesired

      public boolean isRecursionDesired()
      Returns true if and only if this resolver sends a DNS query with the RD (recursion desired) flag set. The default value is true.
    • maxQueriesPerResolve

      public int maxQueriesPerResolve()
      Returns the maximum allowed number of DNS queries to send when resolving a host name. The default value is 8.
    • maxPayloadSize

      public int maxPayloadSize()
      Returns the capacity of the datagram packet buffer (in bytes). The default value is 4096 bytes.
    • isOptResourceEnabled

      public boolean isOptResourceEnabled()
      Returns the automatic inclusion of a optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response is enabled.
    • hostsFileEntriesResolver

      public io.netty.resolver.HostsFileEntriesResolver hostsFileEntriesResolver()
      Returns the component that tries to resolve hostnames against the hosts file prior to asking to remotes DNS servers.
    • close

      public void close()
      Closes the internal datagram channel used for sending and receiving DNS messages, and clears all DNS resource records from the cache. Attempting to send a DNS query or to resolve a domain name will fail once this method has been called.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface io.netty.resolver.NameResolver<InetAddress>
      Overrides:
      close in class io.netty.resolver.SimpleNameResolver<InetAddress>
    • executor

      protected io.netty.channel.EventLoop executor()
      Overrides:
      executor in class io.netty.resolver.SimpleNameResolver<InetAddress>
    • resolve

      public final io.netty.util.concurrent.Future<InetAddress> resolve(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
      Resolves the specified name into an address.
      Parameters:
      inetHost - the name to resolve
      additionals - additional records (OPT)
      Returns:
      the address as the result of the resolution
    • resolve

      public final io.netty.util.concurrent.Future<InetAddress> resolve(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<InetAddress> promise)
      Resolves the specified name into an address.
      Parameters:
      inetHost - the name to resolve
      additionals - additional records (OPT)
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the address as the result of the resolution
    • resolveAll

      public final io.netty.util.concurrent.Future<List<InetAddress>> resolveAll(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
      Resolves the specified host name and port into a list of address.
      Parameters:
      inetHost - the name to resolve
      additionals - additional records (OPT)
      Returns:
      the list of the address as the result of the resolution
    • resolveAll

      public final io.netty.util.concurrent.Future<List<InetAddress>> resolveAll(String inetHost, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<List<InetAddress>> promise)
      Resolves the specified host name and port into a list of address.
      Parameters:
      inetHost - the name to resolve
      additionals - additional records (OPT)
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the list of the address as the result of the resolution
    • doResolve

      protected void doResolve(String inetHost, io.netty.util.concurrent.Promise<InetAddress> promise) throws Exception
      Specified by:
      doResolve in class io.netty.resolver.SimpleNameResolver<InetAddress>
      Throws:
      Exception
    • resolveAll

      public final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>> resolveAll(io.netty.handler.codec.dns.DnsQuestion question)
      Resolves the DnsRecords that are matched by the specified DnsQuestion. Unlike query(DnsQuestion), this method handles redirection, CNAMEs and multiple name servers. If the specified DnsQuestion is A or AAAA, this method looks up the configured HostsFileEntries before sending a query to the name servers. If a match is found in the HostsFileEntries, a synthetic A or AAAA record will be returned.
      Parameters:
      question - the question
      Returns:
      the list of the DnsRecords as the result of the resolution
    • resolveAll

      public final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>> resolveAll(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
      Resolves the DnsRecords that are matched by the specified DnsQuestion. Unlike query(DnsQuestion), this method handles redirection, CNAMEs and multiple name servers. If the specified DnsQuestion is A or AAAA, this method looks up the configured HostsFileEntries before sending a query to the name servers. If a match is found in the HostsFileEntries, a synthetic A or AAAA record will be returned.
      Parameters:
      question - the question
      additionals - additional records (OPT)
      Returns:
      the list of the DnsRecords as the result of the resolution
    • resolveAll

      public final io.netty.util.concurrent.Future<List<io.netty.handler.codec.dns.DnsRecord>> resolveAll(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<List<io.netty.handler.codec.dns.DnsRecord>> promise)
      Resolves the DnsRecords that are matched by the specified DnsQuestion. Unlike query(DnsQuestion), this method handles redirection, CNAMEs and multiple name servers. If the specified DnsQuestion is A or AAAA, this method looks up the configured HostsFileEntries before sending a query to the name servers. If a match is found in the HostsFileEntries, a synthetic A or AAAA record will be returned.
      Parameters:
      question - the question
      additionals - additional records (OPT)
      promise - the Promise which will be fulfilled when the resolution is finished
      Returns:
      the list of the DnsRecords as the result of the resolution
    • doResolve

      protected void doResolve(String inetHost, io.netty.handler.codec.dns.DnsRecord[] additionals, io.netty.util.concurrent.Promise<InetAddress> promise, DnsCache resolveCache) throws Exception
      Hook designed for extensibility so one can pass a different cache on each resolution attempt instead of using the global one.
      Throws:
      Exception
    • doResolveAll

      protected void doResolveAll(String inetHost, io.netty.util.concurrent.Promise<List<InetAddress>> promise) throws Exception
      Specified by:
      doResolveAll in class io.netty.resolver.SimpleNameResolver<InetAddress>
      Throws:
      Exception
    • doResolveAll

      protected void doResolveAll(String inetHost, io.netty.handler.codec.dns.DnsRecord[] additionals, io.netty.util.concurrent.Promise<List<InetAddress>> promise, DnsCache resolveCache) throws Exception
      Hook designed for extensibility so one can pass a different cache on each resolution attempt instead of using the global one.
      Throws:
      Exception
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(io.netty.handler.codec.dns.DnsQuestion question)
      Sends a DNS query with the specified question.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
      Sends a DNS query with the specified question with additional records.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(io.netty.handler.codec.dns.DnsQuestion question, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
      Sends a DNS query with the specified question.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question)
      Sends a DNS query with the specified question using the specified name server list.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals)
      Sends a DNS query with the specified question with additional records using the specified name server list.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
      Sends a DNS query with the specified question using the specified name server list.
    • query

      public io.netty.util.concurrent.Future<io.netty.channel.AddressedEnvelope<io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> query(InetSocketAddress nameServerAddr, io.netty.handler.codec.dns.DnsQuestion question, Iterable<io.netty.handler.codec.dns.DnsRecord> additionals, io.netty.util.concurrent.Promise<io.netty.channel.AddressedEnvelope<? extends io.netty.handler.codec.dns.DnsResponse,InetSocketAddress>> promise)
      Sends a DNS query with the specified question with additional records using the specified name server list.
    • isTransportOrTimeoutError

      public static boolean isTransportOrTimeoutError(Throwable cause)
      Returns true if the Throwable was caused by an timeout or transport error. These methods can be used on the Future.cause() that is returned by the various methods exposed by this DnsNameResolver.
    • isTimeoutError

      public static boolean isTimeoutError(Throwable cause)
      Returns true if the Throwable was caused by an timeout. These methods can be used on the Future.cause() that is returned by the various methods exposed by this DnsNameResolver.