List of usage examples for io.vertx.core.dns DnsClient resolveNS
@Fluent DnsClient resolveNS(String name, Handler<AsyncResult<List<String>>> handler);
From source file:examples.DNSExamples.java
License:Open Source License
public void example11(Vertx vertx) { DnsClient client = vertx.createDnsClient(53, "10.0.0.1"); client.resolveNS("vertx.io", ar -> { if (ar.succeeded()) { List<String> records = ar.result(); for (String record : records) { System.out.println(record); }// w w w . j a va 2 s.c o m } else { System.out.println("Failed to resolve entry" + ar.cause()); } }); }