@Test public void testReverseLookupIpv4() throws Exception { String address = "10.0.0.1"; String ptr = "ptr.vertx.io"; dnsServer.testReverseLookup(ptr); DnsClient dns = prepareDns(); dns.reverseLookup(address, onSuccess(result -> { assertEquals(ptr, result); testComplete(); })); await(); }
@Test public void testReverseLookupIpv6() throws Exception { String ptr = "ptr.vertx.io"; dnsServer.testReverseLookup(ptr); DnsClient dns = prepareDns(); dns.reverseLookup("::1", onSuccess(result -> { assertEquals(ptr, result); testComplete(); })); await(); }
/** * Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record * but allows you to just pass in the IP address and not a valid ptr query string. * @param ipaddress the IP address to resolve the PTR for * @param handler the to notify with the . The handler will get notified with the resolved {@link java.lang.String} if a record was found. If none was found it will get notified 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 reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler) { delegate.reverseLookup(ipaddress, handler); return this; }
/** * Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record * but allows you to just pass in the IP address and not a valid ptr query string. * @param ipaddress the IP address to resolve the PTR for * @param handler the to notify with the . The handler will get notified with the resolved {@link java.lang.String} if a record was found. If none was found it will get notified 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 reverseLookup(String ipaddress, Handler<AsyncResult<String>> handler) { delegate.reverseLookup(ipaddress, handler); return this; }
@Test public void testReverseLookupIpv4() throws Exception { String address = "10.0.0.1"; String ptr = "ptr.vertx.io"; dnsServer.testReverseLookup(ptr); DnsClient dns = prepareDns(); dns.reverseLookup(address, onSuccess(result -> { assertEquals(ptr, result); testComplete(); })); await(); }
@Test public void testReverseLookupIpv6() throws Exception { String ptr = "ptr.vertx.io"; dnsServer.testReverseLookup(ptr); DnsClient dns = prepareDns(); dns.reverseLookup("::1", onSuccess(result -> { assertEquals(ptr, result); testComplete(); })); await(); }