Interface DnsResolver
-
- All Known Implementing Classes:
NettyDnsResolver
,NettyResolverContext
public interface DnsResolver
Asynchronous DNS resolution.- Author:
- jwhite
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<Optional<InetAddress>>
lookup(String hostname)
Perform a DNS lookup for the given hostname.CompletableFuture<Optional<String>>
reverseLookup(InetAddress inetAddress)
Perform a reverse DNS lookup for the given IP address.
-
-
-
Method Detail
-
lookup
CompletableFuture<Optional<InetAddress>> lookup(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
CompletableFuture<Optional<String>> reverseLookup(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
-
-