Interface DnsQueryLifecycleObserver

    • Method Detail

      • queryWritten

        void queryWritten​(InetSocketAddress dnsServerAddress,
                          Future<Void> future)
        The query has been written.
        Parameters:
        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.
      • queryCancelled

        void queryCancelled​(int queriesRemaining)
        The query may have been written but it was cancelled at some point.
        Parameters:
        queriesRemaining - The number of queries remaining.
      • queryRedirected

        DnsQueryLifecycleObserver queryRedirected​(List<InetSocketAddress> nameServers)
        The query has been redirected to another list of DNS servers.
        Parameters:
        nameServers - The name servers the query has been redirected to.
        Returns:
        An observer for the new query which we may issue.
      • queryCNAMEd

        DnsQueryLifecycleObserver queryCNAMEd​(DnsQuestion cnameQuestion)
        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 - the question we would use if we issue a new query.
        Returns:
        An observer for the new query which we may issue.
      • queryNoAnswer

        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.
        Parameters:
        code - the unexpected response code.
        Returns:
        An observer for the new query which we may issue.
      • queryFailed

        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
        Parameters:
        cause - The cause which for the failure.
      • querySucceed

        void querySucceed()
        The query received the expected results.