Package io.netty.resolver.dns
Class NoopDnsQueryLifecycleObserver
java.lang.Object
io.netty.resolver.dns.NoopDnsQueryLifecycleObserver
- All Implemented Interfaces:
DnsQueryLifecycleObserver
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
queryCancelled
(int queriesRemaining) The query may have been written but it was cancelled at some point.queryCNAMEd
(DnsQuestion cnameQuestion) The query returned a CNAME which we may attempt to follow with a new query.void
queryFailed
(Throwable cause) The following criteria are possible: IO Error Server responded with an invalid DNS response Server responded with a valid DNS response, but it didn't progress the resolutionqueryNoAnswer
(DnsResponseCode code) The response to the query didn't provide the expected response code, but it didn't returnDnsResponseCode.NXDOMAIN
so we may try to query again.queryRedirected
(List<InetSocketAddress> nameServers) The query has been redirected to another list of DNS servers.void
The query received the expected results.void
queryWritten
(InetSocketAddress dnsServerAddress, ChannelFuture future) The query has been written.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoopDnsQueryLifecycleObserver
private NoopDnsQueryLifecycleObserver()
-
-
Method Details
-
queryWritten
Description copied from interface:DnsQueryLifecycleObserver
The query has been written.- Specified by:
queryWritten
in interfaceDnsQueryLifecycleObserver
- Parameters:
dnsServerAddress
- The DNS server address which the query was sent to.future
- The future which represents the status of the write operation for the DNS query.
-
queryCancelled
public void queryCancelled(int queriesRemaining) Description copied from interface:DnsQueryLifecycleObserver
The query may have been written but it was cancelled at some point.- Specified by:
queryCancelled
in interfaceDnsQueryLifecycleObserver
- Parameters:
queriesRemaining
- The number of queries remaining.
-
queryRedirected
Description copied from interface:DnsQueryLifecycleObserver
The query has been redirected to another list of DNS servers.- Specified by:
queryRedirected
in interfaceDnsQueryLifecycleObserver
- Parameters:
nameServers
- The name servers the query has been redirected to.- Returns:
- An observer for the new query which we may issue.
-
queryCNAMEd
Description copied from interface:DnsQueryLifecycleObserver
The query returned a CNAME which we may attempt to follow with a new query.Note that multiple queries may be encountering a CNAME. For example a if both
DnsRecordType.AAAA
andDnsRecordType.A
are supported we may query for both.- Specified by:
queryCNAMEd
in interfaceDnsQueryLifecycleObserver
- Parameters:
cnameQuestion
- the question we would use if we issue a new query.- Returns:
- An observer for the new query which we may issue.
-
queryNoAnswer
Description copied from interface:DnsQueryLifecycleObserver
The response to the query didn't provide the expected response code, but it didn't returnDnsResponseCode.NXDOMAIN
so we may try to query again.- Specified by:
queryNoAnswer
in interfaceDnsQueryLifecycleObserver
- Parameters:
code
- the unexpected response code.- Returns:
- An observer for the new query which we may issue.
-
queryFailed
Description copied from interface:DnsQueryLifecycleObserver
The following criteria are possible:- IO Error
- Server responded with an invalid DNS response
- Server responded with a valid DNS response, but it didn't progress the resolution
- Specified by:
queryFailed
in interfaceDnsQueryLifecycleObserver
- Parameters:
cause
- The cause which for the failure.
-
querySucceed
public void querySucceed()Description copied from interface:DnsQueryLifecycleObserver
The query received the expected results.- Specified by:
querySucceed
in interfaceDnsQueryLifecycleObserver
-