io.vertx.core.dns

## Interface DnsClient

-     public interface DnsClient

  Provides a way to asynchronously lookup information from DNS servers.

  Please consult the documentation for more information on DNS clients.

  Author:
    Norman Maurer

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<String>` | `lookup(String name)` Like `lookup(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `lookup(String name, Handler<AsyncResult<String>> handler)` Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.
    `Future<String>` | `lookup4(String name)` Like `lookup4(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `lookup4(String name, Handler<AsyncResult<String>> handler)` Try to lookup the A (ipv4) record for the given name.
    `Future<String>` | `lookup6(String name)` Like `lookup6(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `lookup6(String name, Handler<AsyncResult<String>> handler)` Try to lookup the AAAA (ipv6) record for the given name.
    `Future<List<String>>` | `resolveA(String name)` Like `resolveA(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveA(String name, Handler<AsyncResult<List<String>>> handler)` Try to resolve all A (ipv4) records for the given name.
    `Future<List<String>>` | `resolveAAAA(String name)` Like `resolveAAAA(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveAAAA(String name, Handler<AsyncResult<List<String>>> handler)` Try to resolve all AAAA (ipv6) records for the given name.
    `Future<List<String>>` | `resolveCNAME(String name)` Like `resolveCNAME(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveCNAME(String name, Handler<AsyncResult<List<String>>> handler)` Try to resolve the CNAME record for the given name.
    `Future<List<MxRecord>>` | `resolveMX(String name)` Like `resolveMX(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveMX(String name, Handler<AsyncResult<List<MxRecord>>> handler)` Try to resolve the MX records for the given name.
    `Future<List<String>>` | `resolveNS(String name)` Like `resolveNS(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveNS(String name, Handler<AsyncResult<List<String>>> handler)` Try to resolve the NS records for the given name.
    `Future<String>` | `resolvePTR(String name)` Like `resolvePTR(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolvePTR(String name, Handler<AsyncResult<String>> handler)` Try to resolve the PTR record for the given name.
    `Future<List<SrvRecord>>` | `resolveSRV(String name)` Like `resolveSRV(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveSRV(String name, Handler<AsyncResult<List<SrvRecord>>> handler)` Try to resolve the SRV records for the given name.
    `Future<List<String>>` | `resolveTXT(String name)` Like `resolveTXT(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `resolveTXT(String name, Handler<AsyncResult<List<String>>> handler)` Try to resolve the TXT records for the given name.
    `Future<String>` | `reverseLookup(String ipaddress)` Like `reverseLookup(String, Handler)` but returns a `Future` of the asynchronous result
    `DnsClient` | `reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler)` Try to do a reverse lookup of an IP address.

- - ### Method Detail

    - #### lookup

          DnsClient lookup(String name,
                           Handler<AsyncResult<String>> handler)

      Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used.
      Parameters:
        `name` - the name to resolve
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved address if a record was found. If non was found it will get notifed with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently

    - #### lookup

          Future<String> lookup(String name)

      Like `lookup(String, Handler)` but returns a `Future` of the asynchronous result

    - #### lookup4

          DnsClient lookup4(String name,
                            Handler<AsyncResult<String>> handler)

      Try to lookup the A (ipv4) record for the given name. The first found will be used.
      Parameters:
        `name` - the name to resolve
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved `Inet4Address` if a record was found. If non was found it will get notifed with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently

    - #### lookup4

          Future<String> lookup4(String name)

      Like `lookup4(String, Handler)` but returns a `Future` of the asynchronous result

    - #### lookup6

          DnsClient lookup6(String name,
                            Handler<AsyncResult<String>> handler)

      Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.
      Parameters:
        `name` - the name to resolve
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved `Inet6Address` if a record was found. If non was found it will get notifed with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently

    - #### lookup6

          Future<String> lookup6(String name)

      Like `lookup6(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveA

          DnsClient resolveA(String name,
                             Handler<AsyncResult<List<String>>> handler)

      Try to resolve all A (ipv4) records for the given name.
      Parameters:
        `name` - the name to resolve
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a `List` that contains all the resolved `Inet4Address`es. If none was found an empty `List` will be used. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently

    - #### resolveA

          Future<List<String>> resolveA(String name)

      Like `resolveA(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveAAAA

          DnsClient resolveAAAA(String name,
                                Handler<AsyncResult<List<String>>> handler)

      Try to resolve all AAAA (ipv6) records for the given name.
      Parameters:
        `name` - the name to resolve
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a `List` that contains all the resolved `Inet6Address`es. If none was found an empty `List` will be used. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently

    - #### resolveAAAA

          Future<List<String>> resolveAAAA(String name)

      Like `resolveAAAA(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveCNAME

          DnsClient resolveCNAME(String name,
                                 Handler<AsyncResult<List<String>>> handler)

      Try to resolve the CNAME record for the given name.
      Parameters:
        `name` - the name to resolve the CNAME for
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved `String` if a record was found. If none was found it will get notified with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolveCNAME

          Future<List<String>> resolveCNAME(String name)

      Like `resolveCNAME(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveMX

          DnsClient resolveMX(String name,
                              Handler<AsyncResult<List<MxRecord>>> handler)

      Try to resolve the MX records for the given name.
      Parameters:
        `name` - the name for which the MX records should be resolved
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a List that contains all resolved `MxRecord`s, sorted by their `MxRecord.priority()`. If non was found it will get notified with an empty `List`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolveMX

          Future<List<MxRecord>> resolveMX(String name)

      Like `resolveMX(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveTXT

          DnsClient resolveTXT(String name,
                               Handler<AsyncResult<List<String>>> handler)

      Try to resolve the TXT records for the given name.
      Parameters:
        `name` - the name for which the TXT records should be resolved
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a List that contains all resolved `String`s. If none was found it will get notified with an empty `List`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolveTXT

          Future<List<String>> resolveTXT(String name)

      Like `resolveTXT(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolvePTR

          DnsClient resolvePTR(String name,
                               Handler<AsyncResult<String>> handler)

      Try to resolve the PTR record for the given name.
      Parameters:
        `name` - the name to resolve the PTR for
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved `String` if a record was found. If none was found it will get notified with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolvePTR

          Future<String> resolvePTR(String name)

      Like `resolvePTR(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveNS

          DnsClient resolveNS(String name,
                              Handler<AsyncResult<List<String>>> handler)

      Try to resolve the NS records for the given name.
      Parameters:
        `name` - the name for which the NS records should be resolved
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a List that contains all resolved `String`s. If none was found it will get notified with an empty `List`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolveNS

          Future<List<String>> resolveNS(String name)

      Like `resolveNS(String, Handler)` but returns a `Future` of the asynchronous result

    - #### resolveSRV

          DnsClient resolveSRV(String name,
                               Handler<AsyncResult<List<SrvRecord>>> handler)

      Try to resolve the SRV records for the given name.
      Parameters:
        `name` - the name for which the SRV records should be resolved
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with a List that contains all resolved `SrvRecord`s. If none was found it will get notified with an empty `List`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### resolveSRV

          Future<List<SrvRecord>> resolveSRV(String name)

      Like `resolveSRV(String, Handler)` but returns a `Future` of the asynchronous result

    - #### reverseLookup

          DnsClient reverseLookup(String ipaddress,
                                  Handler<AsyncResult<String>> handler)

      Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record but allows you to just pass in the IP address and not a valid ptr query string.
      Parameters:
        `ipaddress` - the IP address to resolve the PTR for
        `handler` - the `Handler` to notify with the `AsyncResult`. The handler will get notified with the resolved `String` if a record was found. If none was found it will get notified with `null`. If an error accours it will get failed.
      Returns:
        a reference to this, so the API can be used fluently.

    - #### reverseLookup

          Future<String> reverseLookup(String ipaddress)

      Like `reverseLookup(String, Handler)` but returns a `Future` of the asynchronous result

Copyright © 2023 Eclipse. All rights reserved.