Interface DnsResolver

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<java.util.Optional<java.net.InetAddress>> lookup​(java.lang.String hostname)
      Perform a DNS lookup for the given hostname.
      java.util.concurrent.CompletableFuture<java.util.Optional<java.lang.String>> reverseLookup​(java.net.InetAddress inetAddress)
      Perform a reverse DNS lookup for the given IP address.
    • Method Detail

      • lookup

        java.util.concurrent.CompletableFuture<java.util.Optional<java.net.InetAddress>> lookup​(java.lang.String hostname)
        Perform a DNS lookup for the given hostname. Returns a future that contains the lookup results. If the optional is empty the lookup was completed but no result was found.
        Parameters:
        hostname - hostname to lookup
        Returns:
        a future
      • reverseLookup

        java.util.concurrent.CompletableFuture<java.util.Optional<java.lang.String>> reverseLookup​(java.net.InetAddress inetAddress)
        Perform a reverse DNS lookup for the given IP address. Returns a future that contains the lookup results. If the optional is empty the lookup was completed but no result was found.
        Parameters:
        inetAddress - IP address to lookup
        Returns:
        a future