InetNameResolver.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final AuthoritativeDnsServerCache | |
| pack-priv final Channel | |
| pack-priv final Promise | |
| private final DnsCnameCache | |
| private final boolean | |
| private static final DatagramDnsResponseDecoder | |
| private static final DatagramDnsQueryEncoder | |
| private final boolean | |
| private static final UnixResolverOptions | |
| pack-priv static final ResolvedAddressTypes | |
| pack-priv static final String[] | |
| private final DnsQueryLifecycleObserverFactory | |
| private final DnsServerAddressStreamProvider | |
| private static final DnsRecord[] | |
| private final HostsFileEntriesResolver | |
| private static final ProtocolFamily[] | |
| private static final DnsRecordType[] | |
| private static final ProtocolFamily[] | |
| private static final DnsRecordType[] | |
| private static final ProtocolFamily[] | |
| private static final DnsRecordType[] | |
| private static final ProtocolFamily[] | |
| private static final DnsRecordType[] | |
| private static final String | |
| private static final InetAddress | |
| private static final InternalLogger | |
| private final int | |
| private final int | |
| private final FastThreadLocal | |
| private final Comparator | |
| private final int | |
| private final boolean | |
| private final ProtocolFamily | |
| pack-priv final DnsQueryContextManager | queryContextManager
Manages the |
| private final long | |
| private final boolean | |
| private final DnsCache | |
| private final ResolvedAddressTypes | |
| private final ProtocolFamily[] | |
| private final DnsRecordType[] | |
| private final String[] | |
| private final ChannelFactory | |
| private final boolean | |
| private final boolean | |
| private static final TcpDnsQueryEncoder | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public | DnsNameResolver(EventLoop
the eventLoop, ChannelFactory<? extends DatagramChannel> EventLoop which will perform the communication with the DNS serversthe channelFactory, final DnsCache ChannelFactory that will create a DatagramChannelthe DNS resolved entries cache resolveCache, final DnsCache the cache used to find the authoritative DNS server for a domain authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory used to generate new instances of dnsQueryLifecycleObserverFactory, long DnsQueryLifecycleObserver which
can be used to track metrics for DNS servers.timeout of each DNS query in millis queryTimeoutMillis, ResolvedAddressTypes the preferred address types resolvedAddressTypes, boolean if recursion desired flag must be set recursionDesired, int the maximum allowed number of DNS queries for a given name resolution maxQueriesPerResolve, int the capacity of the datagram packet buffer maxPayloadSize, boolean if automatic inclusion of a optional records is enabled optResourceEnabled, HostsFileEntriesResolver the hostsFileEntriesResolver, DnsServerAddressStreamProvider HostsFileEntriesResolver used to check for local aliasesThe dnsServerAddressStreamProvider, String[] DnsServerAddressStreamProvider used to determine the name
servers for each hostname lookup.the list of search domain
(can be null, if so, will try to default to the underlying platform ones) searchDomains, int the ndots value ndots, boolean true if domain / host names should be decoded to unicode when received.
See rfc3492.
Deprecated
Use
Creates a new DNS-based name resolver that communicates with the specified list of DNS servers.
DnsNameResolverBuilder.
|
| public | DnsNameResolver(EventLoop
the eventLoop, ChannelFactory<? extends DatagramChannel> EventLoop which will perform the communication with the DNS serversthe channelFactory, final DnsCache ChannelFactory that will create a DatagramChannelthe DNS resolved entries cache resolveCache, final AuthoritativeDnsServerCache the cache used to find the authoritative DNS server for a domain authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory used to generate new instances of dnsQueryLifecycleObserverFactory, long DnsQueryLifecycleObserver which
can be used to track metrics for DNS servers.timeout of each DNS query in millis queryTimeoutMillis, ResolvedAddressTypes the preferred address types resolvedAddressTypes, boolean if recursion desired flag must be set recursionDesired, int the maximum allowed number of DNS queries for a given name resolution maxQueriesPerResolve, int the capacity of the datagram packet buffer maxPayloadSize, boolean if automatic inclusion of a optional records is enabled optResourceEnabled, HostsFileEntriesResolver the hostsFileEntriesResolver, DnsServerAddressStreamProvider HostsFileEntriesResolver used to check for local aliasesThe dnsServerAddressStreamProvider, String[] DnsServerAddressStreamProvider used to determine the name
servers for each hostname lookup.the list of search domain
(can be null, if so, will try to default to the underlying platform ones) searchDomains, int the ndots value ndots, boolean true if domain / host names should be decoded to unicode when received.
See rfc3492.
Deprecated
Use
Creates a new DNS-based name resolver that communicates with the specified list of DNS servers.
DnsNameResolverBuilder.
|
| pack-priv | DnsNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, ChannelFactory<? extends SocketChannel> socketChannelFactory, final DnsCache resolveCache, final DnsCnameCache cnameCache, final AuthoritativeDnsServerCache authoritativeDnsServerCache, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, int maxPayloadSize, boolean optResourceEnabled, HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn, boolean completeOncePreferredResolved)
|
| pack-priv | DnsNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, ChannelFactory<? extends SocketChannel> socketChannelFactory, final DnsCache resolveCache, final DnsCnameCache cnameCache, final AuthoritativeDnsServerCache authoritativeDnsServerCache, SocketAddress localAddress, DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory, long queryTimeoutMillis, ResolvedAddressTypes resolvedAddressTypes, boolean recursionDesired, int maxQueriesPerResolve, int maxPayloadSize, boolean optResourceEnabled, HostsFileEntriesResolver hostsFileEntriesResolver, DnsServerAddressStreamProvider dnsServerAddressStreamProvider, String[] searchDomains, int ndots, boolean decodeIdn, boolean completeOncePreferredResolved)
|
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | |
| public AuthoritativeDnsServerCache | |
| private static Promise | |
| public void | close()
Overrides io. Implements io. |
| public DnsCnameCache | |
| pack-priv final DnsQueryLifecycleObserverFactory | |
| protected void | doResolve(String inetHost, Promise<InetAddress> promise)
Implements abstract io. resolve(String) to perform the actual name resolution.
|
| protected void | |
| protected void | doResolveAll(String inetHost, Promise<List<InetAddress>> promise)
Implements abstract io. resolveAll(String) to perform the actual name resolution.
|
| protected void | doResolveAll(String inetHost, DnsRecord[] additionals, 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. |
| pack-priv static boolean | doResolveAllCached(String hostname, DnsRecord[] additionals, Promise<List<InetAddress>> promise, DnsCache resolveCache, ProtocolFamily[] resolvedInternetProtocolFamilies)
|
| private void | doResolveAllUncached(final String hostname, final DnsRecord[] additionals, final Promise<?> originalPromise, final Promise<List<InetAddress>> promise, final DnsCache resolveCache, final boolean completeEarlyIfPossible)
|
| private void | doResolveAllUncached0(String hostname, DnsRecord[] additionals, Promise<?> originalPromise, Promise<List<InetAddress>> promise, DnsCache resolveCache, boolean completeEarlyIfPossible)
|
| private boolean | doResolveCached(String hostname, DnsRecord[] additionals, Promise<InetAddress> promise, DnsCache resolveCache)
|
| private void | doResolveUncached(String hostname, DnsRecord[] additionals, final Promise<InetAddress> promise, DnsCache resolveCache)
|
| protected EventLoop | executor()
Overrides io. EventExecutor which is used to notify the listeners of the Future returned
by resolve(String).
|
| pack-priv final void | |
| private static String | |
| public HostsFileEntriesResolver | hostsFileEntriesResolver()
Returns the component that tries to resolve hostnames against the hosts file prior to asking to remotes DNS servers. |
| pack-priv final boolean | |
| private static boolean | isLocalWindowsHost(String hostname)
Checks whether the given hostname is the localhost/host (computer) name on Windows OS. |
| 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. |
| public boolean | isRecursionDesired()
Returns |
| public static boolean | |
| public static boolean | isTransportOrTimeoutError(Throwable cause)
Returns |
| private InetAddress | |
| public int | |
| public int | maxQueriesPerResolve()
Returns the maximum allowed number of DNS queries to send when resolving a host name. |
| pack-priv final int | |
| pack-priv final DnsServerAddressStream | |
| protected DnsServerAddressStream | Returns: ADnsServerAddressStream which will be used to follow the DNS redirect or null if
none should be followed.the hostname. hostname, List<InetSocketAddress> 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 nameservers)DnsServerAddressStream must
allow unresolved addresses if you want to include these as well.Creates a new |
| pack-priv InetSocketAddress | |
| private InetSocketAddress | |
| pack-priv static ProtocolFamily | |
| pack-priv final ProtocolFamily | |
| public Future | |
| public Future | query(DnsQuestion question, Iterable<DnsRecord> additionals)
Sends a DNS query with the specified question with additional records. |
| public Future | query(DnsQuestion question, Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise)
Sends a DNS query with the specified question. |
| public Future | query(InetSocketAddress nameServerAddr, DnsQuestion question)
Sends a DNS query with the specified question using the specified name server list. |
| public Future | query(InetSocketAddress nameServerAddr, DnsQuestion question, Iterable<DnsRecord> additionals)
Sends a DNS query with the specified question with additional records using the specified name server list. |
| public Future | query(InetSocketAddress nameServerAddr, DnsQuestion question, Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise)
Sends a DNS query with the specified question using the specified name server list. |
| public Future | query(InetSocketAddress nameServerAddr, DnsQuestion question, Iterable<DnsRecord> additionals, Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise)
Sends a DNS query with the specified question with additional records using the specified name server list. |
| pack-priv final Future | query0(InetSocketAddress nameServerAddr, DnsQuestion question, DnsRecord[] additionals, boolean flush, Promise<Void> writePromise, Promise<AddressedEnvelope<? extends DnsResponse, InetSocketAddress>> promise)
|
| public long | queryTimeoutMillis()
Returns the timeout of each DNS query performed by this resolver (in milliseconds). |
| public final Future | |
| public final Future | |
| public final Future | Returns: the list of the address as the result of the resolutionthe name to resolve inetHost, Iterable<DnsRecord> additional records ( additionals)OPT)Resolves the specified host name and port into a list of address. |
| public final Future | Returns: the list of the address as the result of the resolutionthe name to resolve inetHost, Iterable<DnsRecord> additional records ( additionals, Promise<List<InetAddress>> OPT)the promise)Promise which will be fulfilled when the name resolution is finishedResolves the specified host name and port into a list of address. |
| public final Future | Returns: the list of theDnsRecords as the result of the resolutionthe question question)Resolves the |
| public final Future | Returns: the list of theDnsRecords as the result of the resolutionthe question question, Iterable<DnsRecord> additional records ( additionals)OPT)Resolves the |
| public final Future | Returns: the list of theDnsRecords as the result of the resolutionthe question question, Iterable<DnsRecord> additional records ( additionals, Promise<List<DnsRecord>> OPT)the promise)Promise which will be fulfilled when the resolution is finishedResolves the |
| private Future | |
| public DnsCache | |
| public ResolvedAddressTypes | |
| pack-priv ProtocolFamily[] | |
| private List | |
| private InetAddress | |
| pack-priv final DnsRecordType[] | |
| pack-priv final String[] | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| private static DnsRecord[] | |
| private static void | |
| pack-priv static <T> boolean | |
| private static void |