use of io.vertx.core.dns.DnsClient in project vert.x by eclipse.
the class DNSExamples method example3.
public void example3(Vertx vertx) {
DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
client.lookup4("vertx.io", ar -> {
if (ar.succeeded()) {
System.out.println(ar.result());
} else {
System.out.println("Failed to resolve entry" + ar.cause());
}
});
}
use of io.vertx.core.dns.DnsClient in project vert.x by eclipse.
the class DNSExamples method example8.
public void example8(Vertx vertx) {
DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
client.resolveMX("vertx.io", ar -> {
if (ar.succeeded()) {
List<MxRecord> records = ar.result();
for (MxRecord record : records) {
System.out.println(record);
}
} else {
System.out.println("Failed to resolve entry" + ar.cause());
}
});
}
use of io.vertx.core.dns.DnsClient in project vert.x by eclipse.
the class DNSExamples method example2.
public void example2(Vertx vertx) {
DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
client.lookup("vertx.io", ar -> {
if (ar.succeeded()) {
System.out.println(ar.result());
} else {
System.out.println("Failed to resolve entry" + ar.cause());
}
});
}
use of io.vertx.core.dns.DnsClient in project vert.x by eclipse.
the class DNSExamples method example5.
public void example5(Vertx vertx) {
DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
client.resolveA("vertx.io", ar -> {
if (ar.succeeded()) {
List<String> records = ar.result();
for (String record : records) {
System.out.println(record);
}
} else {
System.out.println("Failed to resolve entry" + ar.cause());
}
});
}
use of io.vertx.core.dns.DnsClient in project vert.x by eclipse.
the class DNSExamples method example12.
public void example12(Vertx vertx) {
DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
client.resolveSRV("vertx.io", ar -> {
if (ar.succeeded()) {
List<SrvRecord> records = ar.result();
for (SrvRecord record : records) {
System.out.println(record);
}
} else {
System.out.println("Failed to resolve entry" + ar.cause());
}
});
}
Aggregations