public final class BiDnsQueryLifecycleObserver extends java.lang.Object implements DnsQueryLifecycleObserver
DnsQueryLifecycleObserver
into a single DnsQueryLifecycleObserver
.构造器和说明 |
---|
BiDnsQueryLifecycleObserver(DnsQueryLifecycleObserver a,
DnsQueryLifecycleObserver b)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
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(java.lang.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(java.util.List<java.net.InetSocketAddress> nameServers)
The query has been redirected to another list of DNS servers.
|
void |
querySucceed()
The query received the expected results.
|
void |
queryWritten(java.net.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(java.net.InetSocketAddress dnsServerAddress, ChannelFuture future)
DnsQueryLifecycleObserver
queryWritten
在接口中 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
在接口中 DnsQueryLifecycleObserver
queriesRemaining
- The number of queries remaining.public DnsQueryLifecycleObserver queryRedirected(java.util.List<java.net.InetSocketAddress> nameServers)
DnsQueryLifecycleObserver
queryRedirected
在接口中 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
在接口中 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
在接口中 DnsQueryLifecycleObserver
code
- the unexpected response code.public void queryFailed(java.lang.Throwable cause)
DnsQueryLifecycleObserver
queryFailed
在接口中 DnsQueryLifecycleObserver
cause
- The cause which for the failure.public void querySucceed()
DnsQueryLifecycleObserver
querySucceed
在接口中 DnsQueryLifecycleObserver