Top Description Fields Constructors Methods
io.netty.resolver.dns

public final Class BiDnsQueryLifecycleObserver

extends Object
implements DnsQueryLifecycleObserver
Class Inheritance
All Implemented Interfaces
io.netty.resolver.dns.DnsQueryLifecycleObserver
Imports
io.netty.channel.ChannelFuture, io.netty.handler.codec.dns.DnsQuestion, .DnsResponseCode, java.net.InetSocketAddress, java.util.List

Combines two DnsQueryLifecycleObserver into a single DnsQueryLifecycleObserver.

Field Summary

Modifier and TypeField and Description
private final DnsQueryLifecycleObserver
a

private final DnsQueryLifecycleObserver
b

Constructor Summary

AccessConstructor and Description
public
BiDnsQueryLifecycleObserver(DnsQueryLifecycleObserver
The DnsQueryLifecycleObserver that will receive events first.
a
,
DnsQueryLifecycleObserver
The DnsQueryLifecycleObserver that will receive events second.
b
)

Create a new instance.

Method Summary

Modifier and TypeMethod and Description
public void
queryCancelled(int
The number of queries remaining.
queriesRemaining
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCancelled.

The query may have been written but it was cancelled at some point.
public DnsQueryLifecycleObserver
queryCNAMEd(DnsQuestion
the question we would use if we issue a new query.
cnameQuestion
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCNAMEd.

The query returned a CNAME which we may attempt to follow with a new query.
public void
queryFailed(Throwable
The cause which for the failure.
cause
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryFailed.

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
public DnsQueryLifecycleObserver
queryNoAnswer(DnsResponseCode
the unexpected response code.
code
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryNoAnswer.

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.
public DnsQueryLifecycleObserver
queryRedirected(List<InetSocketAddress>
The name servers the query has been redirected to.
nameServers
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryRedirected.

The query has been redirected to another list of DNS servers.
public void
querySucceed()

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.querySucceed.

The query received the expected results.
public void
queryWritten(InetSocketAddress
The DNS server address which the query was sent to.
dnsServerAddress
,
ChannelFuture
The future which represents the status of the write operation for the DNS query.
future
)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryWritten.

The query has been written.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aback to summary
private final DnsQueryLifecycleObserver a
bback to summary
private final DnsQueryLifecycleObserver b

Constructor Detail

BiDnsQueryLifecycleObserverback to summary
public BiDnsQueryLifecycleObserver(DnsQueryLifecycleObserver a, DnsQueryLifecycleObserver b)

Create a new instance.

Parameters
a:DnsQueryLifecycleObserver

The DnsQueryLifecycleObserver that will receive events first.

b:DnsQueryLifecycleObserver

The DnsQueryLifecycleObserver that will receive events second.

Method Detail

queryCancelledback to summary
public void queryCancelled(int queriesRemaining)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCancelled.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCancelled.

The query may have been written but it was cancelled at some point.

Parameters
queriesRemaining:int

The number of queries remaining.

Annotations
@Override
queryCNAMEdback to summary
public DnsQueryLifecycleObserver queryCNAMEd(DnsQuestion cnameQuestion)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCNAMEd.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryCNAMEd.

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 and DnsRecordType#A are supported we may query for both.

Parameters
cnameQuestion:DnsQuestion

the question we would use if we issue a new query.

Returns:DnsQueryLifecycleObserver

An observer for the new query which we may issue.

Annotations
@Override
queryFailedback to summary
public void queryFailed(Throwable cause)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryFailed.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryFailed.

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
Parameters
cause:Throwable

The cause which for the failure.

Annotations
@Override
queryNoAnswerback to summary
public DnsQueryLifecycleObserver queryNoAnswer(DnsResponseCode code)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryNoAnswer.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryNoAnswer.

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.

Parameters
code:DnsResponseCode

the unexpected response code.

Returns:DnsQueryLifecycleObserver

An observer for the new query which we may issue.

Annotations
@Override
queryRedirectedback to summary
public DnsQueryLifecycleObserver queryRedirected(List<InetSocketAddress> nameServers)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryRedirected.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryRedirected.

The query has been redirected to another list of DNS servers.

Parameters
nameServers:List<InetSocketAddress>

The name servers the query has been redirected to.

Returns:DnsQueryLifecycleObserver

An observer for the new query which we may issue.

Annotations
@Override
querySucceedback to summary
public void querySucceed()

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.querySucceed.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.querySucceed.

The query received the expected results.

Annotations
@Override
queryWrittenback to summary
public void queryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future)

Implements io.netty.resolver.dns.DnsQueryLifecycleObserver.queryWritten.

Doc from io.netty.resolver.dns.DnsQueryLifecycleObserver.queryWritten.

The query has been written.

Parameters
dnsServerAddress:InetSocketAddress

The DNS server address which the query was sent to.

future:ChannelFuture

The future which represents the status of the write operation for the DNS query.

Annotations
@Override