Class DnsNameResolver

All Implemented Interfaces:
NameResolver<InetAddress>, Closeable, AutoCloseable

public class DnsNameResolver extends InetNameResolver
A DNS-based InetNameResolver.
  • Field Details

  • Constructor Details

    • DnsNameResolver

      @Deprecated public DnsNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsCache resolveCache, DnsCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, 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(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsCache resolveCache, AuthoritativeDnsServerCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, boolean traceEnabled, int maxPayloadSize, boolean optResourceEnabled, 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