@Test public void testLookup6() throws Exception { dnsServer.testLookup6(); DnsClient dns = prepareDns(); dns.lookup6("vertx.io", onSuccess(result -> { assertEquals("0:0:0:0:0:0:0:1", result); testComplete(); })); await(); }
@Test public void testIllegalArguments() throws Exception { dnsServer.testResolveAAAA("::1"); DnsClient dns = prepareDns(); assertNullPointerException(() -> dns.lookup(null, ar -> {})); assertNullPointerException(() -> dns.lookup4(null, ar -> {})); assertNullPointerException(() -> dns.lookup6(null, ar -> {})); assertNullPointerException(() -> dns.resolveA(null, ar -> {})); assertNullPointerException(() -> dns.resolveAAAA(null, ar -> {})); assertNullPointerException(() -> dns.resolveCNAME(null, ar -> {})); assertNullPointerException(() -> dns.resolveMX(null, ar -> {})); assertNullPointerException(() -> dns.resolveTXT(null, ar -> {})); assertNullPointerException(() -> dns.resolvePTR(null, ar -> {})); assertNullPointerException(() -> dns.resolveNS(null, ar -> {})); assertNullPointerException(() -> dns.resolveSRV(null, ar -> {})); }
/** * Try to lookup the AAAA (ipv6) record for the given name. The first found will be used. * @param name the name to resolve * @param handler the to notify with the . The handler will get notified with the resolved {@link java.net.Inet6Address} if a record was found. If non was found it will get notifed with <code>null</code>. If an error accours it will get failed. * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.core.dns.DnsClient lookup6(String name, Handler<AsyncResult<String>> handler) { delegate.lookup6(name, handler); return this; }
/** * Try to lookup the AAAA (ipv6) record for the given name. The first found will be used. * @param name the name to resolve * @param handler the to notify with the . The handler will get notified with the resolved {@link java.net.Inet6Address} if a record was found. If non was found it will get notifed with <code>null</code>. If an error accours it will get failed. * @return a reference to this, so the API can be used fluently */ public io.vertx.rxjava.core.dns.DnsClient lookup6(String name, Handler<AsyncResult<String>> handler) { delegate.lookup6(name, handler); return this; }
@Test public void testLookup6() throws Exception { dnsServer.testLookup6(); DnsClient dns = prepareDns(); dns.lookup6("vertx.io", onSuccess(result -> { assertEquals("0:0:0:0:0:0:0:1", result); testComplete(); })); await(); }
@Test public void testIllegalArguments() throws Exception { dnsServer.testResolveAAAA("::1"); DnsClient dns = prepareDns(); assertNullPointerException(() -> dns.lookup(null, ar -> {})); assertNullPointerException(() -> dns.lookup4(null, ar -> {})); assertNullPointerException(() -> dns.lookup6(null, ar -> {})); assertNullPointerException(() -> dns.resolveA(null, ar -> {})); assertNullPointerException(() -> dns.resolveAAAA(null, ar -> {})); assertNullPointerException(() -> dns.resolveCNAME(null, ar -> {})); assertNullPointerException(() -> dns.resolveMX(null, ar -> {})); assertNullPointerException(() -> dns.resolveTXT(null, ar -> {})); assertNullPointerException(() -> dns.resolvePTR(null, ar -> {})); assertNullPointerException(() -> dns.resolveNS(null, ar -> {})); assertNullPointerException(() -> dns.resolveSRV(null, ar -> {})); }