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)
DnsQueryLifecycleObserver
queryWritten
in interface DnsQueryLifecycleObserver
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.public void queryCancelled(int queriesRemaining)
DnsQueryLifecycleObserver
queryCancelled
in interface DnsQueryLifecycleObserver
queriesRemaining
- The number of queries remaining.public DnsQueryLifecycleObserver queryRedirected(List<InetSocketAddress> nameServers)
DnsQueryLifecycleObserver
queryRedirected
in interface DnsQueryLifecycleObserver
nameServers
- 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 DnsQueryLifecycleObserver
cnameQuestion
- the question we would use if we issue a new query.public DnsQueryLifecycleObserver queryNoAnswer(DnsResponseCode code)
DnsQueryLifecycleObserver
DnsResponseCode.NXDOMAIN
so we may try to query again.queryNoAnswer
in interface DnsQueryLifecycleObserver
code
- the unexpected response code.public void queryFailed(Throwable cause)
DnsQueryLifecycleObserver
queryFailed
in interface DnsQueryLifecycleObserver
cause
- The cause which for the failure.public void querySucceed()
DnsQueryLifecycleObserver
querySucceed
in interface DnsQueryLifecycleObserver
Copyright © 2008–2024 The Netty Project. All rights reserved.