Home / Type/ DnsQueryLifecycleObserver Type — netty Architecture

DnsQueryLifecycleObserver Type — netty Architecture

Architecture documentation for the DnsQueryLifecycleObserver type/interface in DnsQueryLifecycleObserver.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  829b94bb_f870_a814_3d99_7ff728a4d242["DnsQueryLifecycleObserver"]
  291dca85_b745_336f_b3f5_bb6eb312c593["DnsQueryLifecycleObserver.java"]
  829b94bb_f870_a814_3d99_7ff728a4d242 -->|defined in| 291dca85_b745_336f_b3f5_bb6eb312c593
  style 829b94bb_f870_a814_3d99_7ff728a4d242 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryLifecycleObserver.java lines 45–99

public interface DnsQueryLifecycleObserver {
    /**
     * The query has been written.
     * @param dnsServerAddress The DNS server address which the query was sent to.
     * @param future The future which represents the status of the write operation for the DNS query.
     */
    void queryWritten(InetSocketAddress dnsServerAddress, ChannelFuture future);

    /**
     * The query may have been written but it was cancelled at some point.
     * @param queriesRemaining The number of queries remaining.
     */
    void queryCancelled(int queriesRemaining);

    /**
     * The query has been redirected to another list of DNS servers.
     * @param nameServers The name servers the query has been redirected to.
     * @return An observer for the new query which we may issue.
     */
    DnsQueryLifecycleObserver queryRedirected(List<InetSocketAddress> nameServers);

    /**
     * The query returned a CNAME which we may attempt to follow with a new query.
     * <p>
     * Note that multiple queries may be encountering a CNAME. For example a if both {@link DnsRecordType#AAAA} and
     * {@link DnsRecordType#A} are supported we may query for both.
     * @param cnameQuestion the question we would use if we issue a new query.
     * @return An observer for the new query which we may issue.
     */
    DnsQueryLifecycleObserver queryCNAMEd(DnsQuestion cnameQuestion);

    /**
     * The response to the query didn't provide the expected response code, but it didn't return
     * {@link DnsResponseCode#NXDOMAIN} so we may try to query again.
     * @param code the unexpected response code.
     * @return An observer for the new query which we may issue.
     */
    DnsQueryLifecycleObserver queryNoAnswer(DnsResponseCode code);

    /**
     * The following criteria are possible:
     * <ul>
     *     <li>IO Error</li>
     *     <li>Server responded with an invalid DNS response</li>
     *     <li>Server responded with a valid DNS response, but it didn't progress the resolution</li>
     * </ul>
     * @param cause The cause which for the failure.
     */
    void queryFailed(Throwable cause);

    /**
     * The query received the expected results.
     */
    void querySucceed();
}

Frequently Asked Questions

What is the DnsQueryLifecycleObserver type?
DnsQueryLifecycleObserver is a type/interface in the netty codebase, defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryLifecycleObserver.java.
Where is DnsQueryLifecycleObserver defined?
DnsQueryLifecycleObserver is defined in resolver-dns/src/main/java/io/netty/resolver/dns/DnsQueryLifecycleObserver.java at line 45.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free