DnsNameResolver builder.
| Modifier and Type | Field and Description |
|---|---|
| private AuthoritativeDnsServerCache | |
| private ChannelFactory | channelFactory
Deprecated
as a consequence of
ChannelFactory being deprecated.
|
| private DnsCnameCache | |
| private boolean | |
| private boolean | |
| private DnsQueryLifecycleObserverFactory | |
| private DnsServerAddressStreamProvider | |
| pack-priv volatile EventLoop | |
| private HostsFileEntriesResolver | |
| private SocketAddress | |
| private static final InternalLogger | |
| private int | |
| private int | |
| private int | |
| private Integer | |
| private Integer | |
| private int | |
| private Integer | |
| private boolean | |
| private long | |
| private boolean | |
| private DnsCache | |
| private ResolvedAddressTypes | |
| private boolean | |
| private String[] | |
| private ChannelFactory | socketChannelFactory
Deprecated
as a consequence of
ChannelFactory being deprecated.
|
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | DnsNameResolverBuilder(EventLoop
the eventLoop)EventLoop which will perform the communication with the DNS
servers.Creates a new builder. |
| Modifier and Type | Method and Description |
|---|---|
| public DnsNameResolverBuilder | Returns: thisthe authoritative NS servers cache authoritativeDnsServerCache)
Deprecated
Use
Sets the cache for authoritative NS servers
authoritativeDnsServerCache(AuthoritativeDnsServerCache)
|
| public DnsNameResolverBuilder | Returns: thisthe authoritative NS servers cache authoritativeDnsServerCache)Sets the cache for authoritative NS servers |
| public DnsNameResolver | |
| protected ChannelFactory | |
| public DnsNameResolverBuilder | Returns: thisthe channelFactory)ChannelFactory
Deprecated
as a consequence of
Sets the ChannelFactory being deprecated.
ChannelFactory that will create a DatagramChannel.
|
| public DnsNameResolverBuilder | Returns: thisthe type channelType)Sets the |
| public DnsNameResolverBuilder | Returns: thisthe cache used to cache cnameCache)CNAME mappings for a domain.Sets the cache for |
| public DnsNameResolverBuilder | Returns: thistrue to enable, false to disable.If |
| public static ResolvedAddressTypes | Returns: aResolvedAddressTypesa valid sequence of internetProtocolFamilies)InternetProtocolFamilysCompute a |
| public DnsNameResolverBuilder | Returns: thisthe maximum lookups to consolidate (different hostnames), or maxNumConsolidation)0 if
no consolidation should be performed.Set the maximum size of the cache that is used to consolidate lookups for different hostnames when in-flight. |
| public DnsNameResolverBuilder | |
| public DnsNameResolverBuilder | Returns: thisif should get decoded decodeIdn)Set if domain / host names should be decoded to unicode when received. |
| public DnsNameResolverBuilder | Returns: thisthe factory used to generate objects which can observe individual DNS queries. lifecycleObserverFactory)Set the factory used to generate objects which can observe individual DNS queries. |
| public DnsNameResolverBuilder | |
| public DnsNameResolverBuilder | Returns: thisthe hostsFileEntriesResolver)HostsFileEntriesResolver used to first check
if the hostname is locally aliased.
|
| public DnsNameResolverBuilder | Returns: thisthe bind address localAddress)Configure the address that will be used to bind too. |
| public DnsNameResolverBuilder | Returns: thisthe capacity of the datagram packet buffer maxPayloadSize)Sets the capacity of the datagram packet buffer (in bytes). |
| public DnsNameResolverBuilder | Returns: thisthe max number of queries maxQueriesPerResolve)Sets the maximum allowed number of DNS queries to send when resolving a host name. |
| protected DnsServerAddressStreamProvider | |
| public DnsNameResolverBuilder | Returns: this.Set the |
| public DnsNameResolverBuilder | Returns: thisthe ndots value ndots)Set the number of dots which must appear in a name before an initial absolute query is made. |
| public DnsNameResolverBuilder | Returns: thisthe TTL for failed cached queries negativeTtl)Sets the TTL of the cache for the failed DNS queries (in seconds). |
| private AuthoritativeDnsServerCache | |
| private DnsCache | |
| private DnsCnameCache | |
| public DnsNameResolverBuilder | Returns: thisif optional records inclusion is enabled optResourceEnabled)Enable 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. |
| public DnsNameResolverBuilder | Returns: thisthe query timeout queryTimeoutMillis)Sets the timeout of each DNS query performed by this resolver (in milliseconds). |
| public DnsNameResolverBuilder | Returns: thistrue if recursion is desired recursionDesired)Sets if this resolver has to send a DNS query with the RD (recursion desired) flag set. |
| public DnsNameResolverBuilder | Returns: thisthe DNS resolution results cache resolveCache)Sets the cache for resolution results. |
| public DnsNameResolverBuilder | Returns: thisthe address types resolvedAddressTypes)Sets the list of the protocol families of the address resolved. |
| public DnsNameResolverBuilder | Returns: thisthe search domains searchDomains)Set the list of search domains of the resolver. |
| public DnsNameResolverBuilder | Returns: thisthe channelFactory)ChannelFactory or null
if TCP fallback should not be supported.
By default, TCP fallback is not enabled.
Deprecated
as a consequence of
Sets the ChannelFactory being deprecated.
ChannelFactory that will create a SocketChannel for
TCP fallback if needed.
|
| public DnsNameResolverBuilder | Returns: thisthe channelFactory, boolean ChannelFactory or null
if TCP fallback should not be supported.
By default, TCP fallback is not enabled.if retryOnTimeout)true the DnsNameResolver will also fallback to TCP if a timeout
was detected, if false it will only try to use TCP if the response was marked
as truncated.
Deprecated
as a consequence of
Sets the ChannelFactory being deprecated.
ChannelFactory that will create a SocketChannel for
TCP fallback if needed.
|
| public DnsNameResolverBuilder | Returns: thisthe type or channelType)null if TCP fallback
should not be supported. By default, TCP fallback is not enabled.Sets the |
| public DnsNameResolverBuilder | Returns: thisthe type or channelType, boolean null if TCP fallback
should not be supported. By default, TCP fallback is not enabled.if retryOnTimeout)true the DnsNameResolver will also fallback to TCP if a timeout
was detected, if false it will only try to use TCP if the response was marked
as truncated.Sets the |
| public DnsNameResolverBuilder | Returns: thistrue if trace is enabled traceEnabled)
Deprecated
Prefer to configure
a
Sets if this resolver should generate the detailed trace information in an exception message so that
it is easier to understand the cause of resolution failure.
LoggingDnsQueryLifeCycleObserverFactory instead.
|
| public DnsNameResolverBuilder | Returns: thisthe minimum TTL minTtl, int the maximum TTL maxTtl)Sets the minimum and maximum TTL of the cached DNS resource records (in seconds). |
| authoritativeDnsServerCache | back to summary |
|---|---|
| private AuthoritativeDnsServerCache authoritativeDnsServerCache | |
| channelFactory | back to summary |
|---|---|
| private ChannelFactory<? extends DatagramChannel> channelFactory
Deprecated as a consequence of | |
| cnameCache | back to summary |
|---|---|
| private DnsCnameCache cnameCache | |
| completeOncePreferredResolved | back to summary |
|---|---|
| private boolean completeOncePreferredResolved | |
| decodeIdn | back to summary |
|---|---|
| private boolean decodeIdn | |
| dnsQueryLifecycleObserverFactory | back to summary |
|---|---|
| private DnsQueryLifecycleObserverFactory dnsQueryLifecycleObserverFactory | |
| dnsServerAddressStreamProvider | back to summary |
|---|---|
| private DnsServerAddressStreamProvider dnsServerAddressStreamProvider | |
| eventLoop | back to summary |
|---|---|
| pack-priv volatile EventLoop eventLoop | |
| hostsFileEntriesResolver | back to summary |
|---|---|
| private HostsFileEntriesResolver hostsFileEntriesResolver | |
| localAddress | back to summary |
|---|---|
| private SocketAddress localAddress | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| maxNumConsolidation | back to summary |
|---|---|
| private int maxNumConsolidation | |
| maxPayloadSize | back to summary |
|---|---|
| private int maxPayloadSize | |
| maxQueriesPerResolve | back to summary |
|---|---|
| private int maxQueriesPerResolve | |
| maxTtl | back to summary |
|---|---|
| private Integer maxTtl | |
| minTtl | back to summary |
|---|---|
| private Integer minTtl | |
| ndots | back to summary |
|---|---|
| private int ndots | |
| negativeTtl | back to summary |
|---|---|
| private Integer negativeTtl | |
| optResourceEnabled | back to summary |
|---|---|
| private boolean optResourceEnabled | |
| queryTimeoutMillis | back to summary |
|---|---|
| private long queryTimeoutMillis | |
| recursionDesired | back to summary |
|---|---|
| private boolean recursionDesired | |
| resolveCache | back to summary |
|---|---|
| private DnsCache resolveCache | |
| resolvedAddressTypes | back to summary |
|---|---|
| private ResolvedAddressTypes resolvedAddressTypes | |
| retryOnTimeout | back to summary |
|---|---|
| private boolean retryOnTimeout | |
| searchDomains | back to summary |
|---|---|
| private String[] searchDomains | |
| socketChannelFactory | back to summary |
|---|---|
| private ChannelFactory<? extends SocketChannel> socketChannelFactory
Deprecated as a consequence of | |
| traceEnabled | back to summary |
|---|---|
| private boolean traceEnabled | |
| DnsNameResolverBuilder | back to summary |
|---|---|
| public DnsNameResolverBuilder() Creates a new builder. | |
| DnsNameResolverBuilder | back to summary |
|---|---|
| public DnsNameResolverBuilder(EventLoop eventLoop) Creates a new builder. | |
| authoritativeDnsServerCache | back to summary |
|---|---|
| public DnsNameResolverBuilder authoritativeDnsServerCache(DnsCache authoritativeDnsServerCache)
Deprecated Use Sets the cache for authoritative NS servers
| |
| authoritativeDnsServerCache | back to summary |
|---|---|
| public DnsNameResolverBuilder authoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache) Sets the cache for authoritative NS servers
| |
| build | back to summary |
|---|---|
| public DnsNameResolver build() Returns a new
| |
| channelFactory | back to summary |
|---|---|
| protected ChannelFactory Deprecated as a consequence of | |
| channelFactory | back to summary |
|---|---|
| public DnsNameResolverBuilder channelFactory(ChannelFactory<? extends DatagramChannel> channelFactory)
Deprecated as a consequence of Sets the
| |
| channelType | back to summary |
|---|---|
| public DnsNameResolverBuilder channelType(Class<? extends DatagramChannel> channelType) Sets the
| |
| cnameCache | back to summary |
|---|---|
| public DnsNameResolverBuilder cnameCache(DnsCnameCache cnameCache) Sets the cache for
| |
| completeOncePreferredResolved | back to summary |
|---|---|
| public DnsNameResolverBuilder completeOncePreferredResolved(boolean completeOncePreferredResolved) If
| |
| computeResolvedAddressTypes | back to summary |
|---|---|
| public static ResolvedAddressTypes computeResolvedAddressTypes(InternetProtocolFamily... internetProtocolFamilies) Compute a
| |
| consolidateCacheSize | back to summary |
|---|---|
| public DnsNameResolverBuilder consolidateCacheSize(int maxNumConsolidation) Set the maximum size of the cache that is used to consolidate lookups for different hostnames when in-flight. This means if multiple lookups are done for the same hostname and still in-flight only one actual query will be made and the result will be cascaded to the others.
| |
| copy | back to summary |
|---|---|
| public DnsNameResolverBuilder copy() Creates a copy of this | |
| decodeIdn | back to summary |
|---|---|
| public DnsNameResolverBuilder decodeIdn(boolean decodeIdn) Set if domain / host names should be decoded to unicode when received. See rfc3492.
| |
| dnsQueryLifecycleObserverFactory | back to summary |
|---|---|
| public DnsNameResolverBuilder dnsQueryLifecycleObserverFactory(DnsQueryLifecycleObserverFactory lifecycleObserverFactory) Set the factory used to generate objects which can observe individual DNS queries.
| |
| eventLoop | back to summary |
|---|---|
| public DnsNameResolverBuilder eventLoop(EventLoop eventLoop) Sets the
| |
| hostsFileEntriesResolver | back to summary |
|---|---|
public DnsNameResolverBuilder hostsFileEntriesResolver(HostsFileEntriesResolver hostsFileEntriesResolver)
| |
| localAddress | back to summary |
|---|---|
| public DnsNameResolverBuilder localAddress(SocketAddress localAddress) Configure the address that will be used to bind too. If
| |
| maxPayloadSize | back to summary |
|---|---|
| public DnsNameResolverBuilder maxPayloadSize(int maxPayloadSize) Sets the capacity of the datagram packet buffer (in bytes). The default value is
| |
| maxQueriesPerResolve | back to summary |
|---|---|
| public DnsNameResolverBuilder maxQueriesPerResolve(int maxQueriesPerResolve) Sets the maximum allowed number of DNS queries to send when resolving a host name.
| |
| nameServerProvider | back to summary |
|---|---|
| protected DnsServerAddressStreamProvider nameServerProvider() | |
| nameServerProvider | back to summary |
|---|---|
| public DnsNameResolverBuilder nameServerProvider(DnsServerAddressStreamProvider dnsServerAddressStreamProvider) Set the
| |
| ndots | back to summary |
|---|---|
| public DnsNameResolverBuilder ndots(int ndots) Set the number of dots which must appear in a name before an initial absolute query is made.
The default value is
| |
| negativeTtl | back to summary |
|---|---|
| public DnsNameResolverBuilder negativeTtl(int negativeTtl) Sets the TTL of the cache for the failed DNS queries (in seconds).
| |
| newAuthoritativeDnsServerCache | back to summary |
|---|---|
| private AuthoritativeDnsServerCache newAuthoritativeDnsServerCache() | |
| newCache | back to summary |
|---|---|
| private DnsCache newCache() | |
| newCnameCache | back to summary |
|---|---|
| private DnsCnameCache newCnameCache() | |
| optResourceEnabled | back to summary |
|---|---|
| public DnsNameResolverBuilder optResourceEnabled(boolean optResourceEnabled) Enable 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. Some DNSServer may not support this and so fail to answer queries. If you find problems you may want to disable this.
| |
| queryTimeoutMillis | back to summary |
|---|---|
| public DnsNameResolverBuilder queryTimeoutMillis(long queryTimeoutMillis) Sets the timeout of each DNS query performed by this resolver (in milliseconds).
| |
| recursionDesired | back to summary |
|---|---|
| public DnsNameResolverBuilder recursionDesired(boolean recursionDesired) Sets if this resolver has to send a DNS query with the RD (recursion desired) flag set.
| |
| resolveCache | back to summary |
|---|---|
| public DnsNameResolverBuilder resolveCache(DnsCache resolveCache) Sets the cache for resolution results.
| |
| resolvedAddressTypes | back to summary |
|---|---|
| public DnsNameResolverBuilder resolvedAddressTypes(ResolvedAddressTypes resolvedAddressTypes) Sets the list of the protocol families of the address resolved.
You can use
| |
| searchDomains | back to summary |
|---|---|
| public DnsNameResolverBuilder searchDomains(Iterable<String> searchDomains) Set the list of search domains of the resolver.
| |
| socketChannelFactory | back to summary |
|---|---|
| public DnsNameResolverBuilder socketChannelFactory(ChannelFactory<? extends SocketChannel> channelFactory)
Deprecated as a consequence of Sets the
| |
| socketChannelFactory | back to summary |
|---|---|
| public DnsNameResolverBuilder socketChannelFactory(ChannelFactory<? extends SocketChannel> channelFactory, boolean retryOnTimeout)
Deprecated as a consequence of Sets the
| |
| socketChannelType | back to summary |
|---|---|
| public DnsNameResolverBuilder socketChannelType(Class<? extends SocketChannel> channelType) Sets the
| |
| socketChannelType | back to summary |
|---|---|
| public DnsNameResolverBuilder socketChannelType(Class<? extends SocketChannel> channelType, boolean retryOnTimeout) Sets the
| |
| traceEnabled | back to summary |
|---|---|
| public DnsNameResolverBuilder traceEnabled(boolean traceEnabled)
Deprecated Prefer to configure
a Sets if this resolver should generate the detailed trace information in an exception message so that it is easier to understand the cause of resolution failure.
| |
| ttl | back to summary |
|---|---|
| public DnsNameResolverBuilder ttl(int minTtl, int maxTtl) Sets the minimum and maximum TTL of the cached DNS resource records (in seconds). If the TTL of the DNS
resource record returned by the DNS server is less than the minimum TTL or greater than the maximum TTL,
this resolver will ignore the TTL from the DNS server and use the minimum TTL or the maximum TTL instead
respectively.
The default value is
| |