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

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

Introduction

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

Prototype

@Fluent
DnsClient resolvePTR(String name, Handler<AsyncResult<@Nullable String>> handler);

Source Link

Document

Try to resolve the PTR record for the given name.

Usage

From source file:examples.DNSExamples.java

License:Open Source License

public void example14(Vertx vertx) {
    DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
    client.resolvePTR("1.0.0.10.in-addr.arpa", ar -> {
        if (ar.succeeded()) {
            String record = ar.result();
            System.out.println(record);
        } else {/*from w w  w.j  av a 2s .  c o m*/
            System.out.println("Failed to resolve entry" + ar.cause());
        }
    });
}