Example usage for io.vertx.core.dns DnsClient resolveAAAA

List of usage examples for io.vertx.core.dns DnsClient resolveAAAA

Introduction

In this page you can find the example usage for io.vertx.core.dns DnsClient resolveAAAA.

Prototype

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

Source Link

Document

Try to resolve all AAAA (ipv6) records for the given name.

Usage

From source file:examples.DNSExamples.java

License:Open Source License

public void example6(Vertx vertx) {
    DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
    client.resolveAAAA("vertx.io", ar -> {
        if (ar.succeeded()) {
            List<String> records = ar.result();
            for (String record : records) {
                System.out.println(record);
            }//from   w ww  .j  a va  2s  .  com
        } else {
            System.out.println("Failed to resolve entry" + ar.cause());
        }
    });
}