public class DNSResolver
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
DNSResolver(IOService service) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Future<java.lang.Void> |
closeAsync()
Closes the resolver asynchronously
|
java.lang.Iterable<java.net.InetAddress> |
resolve(java.lang.String name)
Resolves the domain
name to IPv4 and (if possible) IPv6 addresses. |
Future<java.lang.Iterable<java.net.InetAddress>> |
resolveAsync(java.lang.String name)
Resolves the domain
name to IPv4 and (if possible) IPv6 addresses. |
public DNSResolver(IOService service)
public Future<java.lang.Iterable<java.net.InetAddress>> resolveAsync(java.lang.String name)
name to IPv4 and (if possible) IPv6 addresses.
Will try using any of the configured DNS servers in the OS.name - domain name to resolveFuture representing the taskpublic java.lang.Iterable<java.net.InetAddress> resolve(java.lang.String name)
name to IPv4 and (if possible) IPv6 addresses.
Will try using any of the configured DNS servers in the OS.name - domain name to resolveIterable object with the IP addresses or nullpublic void close()
close in interface java.lang.AutoCloseable