public final class BiDnsQueryLifecycleObserver extends Object implements DnsQueryLifecycleObserver
DnsQueryLifecycleObserver into a single DnsQueryLifecycleObserver.| Constructor and Description |
|---|
BiDnsQueryLifecycleObserver(DnsQueryLifecycleObserver a,
DnsQueryLifecycleObserver b)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
queryCancelled(int queriesRemaining)
The query may have been written but it was cancelled at some point.
|
DnsQueryLifecycleObserver |
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 resolution
|
DnsQueryLifecycleObserver |
queryNoAnswer(DnsResponseCode code)
The response to the query didn't provide the expected response code, but it didn't return
DnsResponseCode.NXDOMAIN so we may try to query again. |
DnsQueryLifecycleObserver |
queryRedirected(List<InetSocketAddress> nameServers)
The query has been redirected to another list of DNS servers.
|
void |
querySucceed()
The query received the expected results.
|
void |
queryWritten(InetSocketAddress dnsServerAddress,
ChannelFuture future)
The query has been written.
|
public BiDnsQueryLifecycleObserver(DnsQueryLifecycleObserver a, DnsQueryLifecycleObserver b)
a - The DnsQueryLifecycleObserver that will receive events first.b - The DnsQueryLifecycleObserver that will receive events second.public void queryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future)
DnsQueryLifecycleObserverqueryWritten in interface DnsQueryLifecycleObserverdnsServerAddress - 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.public void queryCancelled(int queriesRemaining)
DnsQueryLifecycleObserverqueryCancelled in interface DnsQueryLifecycleObserverqueriesRemaining - The number of queries remaining.public DnsQueryLifecycleObserver queryRedirected(List<InetSocketAddress> nameServers)
DnsQueryLifecycleObserverqueryRedirected in interface DnsQueryLifecycleObservernameServers - The name servers the query has been redirected to.public DnsQueryLifecycleObserver queryCNAMEd(DnsQuestion cnameQuestion)
DnsQueryLifecycleObserver
Note that multiple queries may be encountering a CNAME. For example a if both DnsRecordType.AAAA and
DnsRecordType.A are supported we may query for both.
queryCNAMEd in interface DnsQueryLifecycleObservercnameQuestion - the question we would use if we issue a new query.public DnsQueryLifecycleObserver queryNoAnswer(DnsResponseCode code)
DnsQueryLifecycleObserverDnsResponseCode.NXDOMAIN so we may try to query again.queryNoAnswer in interface DnsQueryLifecycleObservercode - the unexpected response code.public void queryFailed(Throwable cause)
DnsQueryLifecycleObserverqueryFailed in interface DnsQueryLifecycleObservercause - The cause which for the failure.public void querySucceed()
DnsQueryLifecycleObserverquerySucceed in interface DnsQueryLifecycleObserverCopyright © 2008–2025 The Netty Project. All rights reserved.