Class BiDnsQueryLifecycleObserver
java.lang.Object
io.netty.resolver.dns.BiDnsQueryLifecycleObserver
- All Implemented Interfaces:
DnsQueryLifecycleObserver
Combines two
DnsQueryLifecycleObserver into a single DnsQueryLifecycleObserver.-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidqueryCancelled(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.voidqueryFailed(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.NXDOMAINso we may try to query again.queryRedirected(List<InetSocketAddress> nameServers) The query has been redirected to another list of DNS servers.voidThe query received the expected results.voidqueryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future) The query has been written.
-
Constructor Details
-
BiDnsQueryLifecycleObserver
Create a new instance.- Parameters:
a- TheDnsQueryLifecycleObserverthat will receive events first.b- TheDnsQueryLifecycleObserverthat will receive events second.
-
-
Method Details
-
queryWritten
Description copied from interface:DnsQueryLifecycleObserverThe query has been written.- Specified by:
queryWrittenin 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:DnsQueryLifecycleObserverThe query may have been written but it was cancelled at some point.- Specified by:
queryCancelledin interfaceDnsQueryLifecycleObserver- Parameters:
queriesRemaining- The number of queries remaining.
-
queryRedirected
Description copied from interface:DnsQueryLifecycleObserverThe query has been redirected to another list of DNS servers.- Specified by:
queryRedirectedin 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:DnsQueryLifecycleObserverThe 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.AAAAandDnsRecordType.Aare supported we may query for both.- Specified by:
queryCNAMEdin 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:DnsQueryLifecycleObserverThe response to the query didn't provide the expected response code, but it didn't returnDnsResponseCode.NXDOMAINso we may try to query again.- Specified by:
queryNoAnswerin interfaceDnsQueryLifecycleObserver- Parameters:
code- the unexpected response code.- Returns:
- An observer for the new query which we may issue.
-
queryFailed
Description copied from interface:DnsQueryLifecycleObserverThe 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:
queryFailedin interfaceDnsQueryLifecycleObserver- Parameters:
cause- The cause which for the failure.
-
querySucceed
public void querySucceed()Description copied from interface:DnsQueryLifecycleObserverThe query received the expected results.- Specified by:
querySucceedin interfaceDnsQueryLifecycleObserver
-