public interface IGetDNSContextAsyncWithFuture
This interface is for calling the API asynchronously using Future.
Modifier and Type | Method and Description |
---|---|
GetDNSFutureResult |
addressAsync(java.lang.String name,
java.util.HashMap<ExtensionName,java.lang.Object> extensions)
This API call takes argument only as a host name.
|
void |
close()
This method is used to close the current context.
|
GetDNSFutureResult |
generalAsync(java.lang.String name,
RRType requestType,
java.util.HashMap<ExtensionName,java.lang.Object> extensions)
This API call is used for looking up any type of DNS record.
|
GetDNSFutureResult |
hostnameAsync(java.lang.String address,
java.util.HashMap<ExtensionName,java.lang.Object> extensions)
This API call takes both IPV4 AND IPV6 address.
|
void |
run()
This method is used to wait for completion of pending DNS requests and populate the response in the future objects.
|
GetDNSFutureResult |
serviceAsync(java.lang.String name,
java.util.HashMap<ExtensionName,java.lang.Object> extensions)
This API call takes arguments as a domain name for an SRV lookup.
|
GetDNSFutureResult addressAsync(java.lang.String name, java.util.HashMap<ExtensionName,java.lang.Object> extensions) throws GetDNSException
This API call takes argument only as a host name.
There are three critical differences between addressAsync() and GeneralAsync() beyond the missing request_type argument:
name
- host nameextensions
- (optional) a dictionary containing attribute/value pairsGetDNSException
GetDNSFutureResult generalAsync(java.lang.String name, RRType requestType, java.util.HashMap<ExtensionName,java.lang.Object> extensions) throws GetDNSException
This API call is used for looking up any type of DNS record.
GetDNSFutureResult result = context.generalAsync("verisigninc.com", RRType.valueOf("A"), null);
HashMap<String, Object> info = null;
context.run();
info = result.get();
name
- a representation of the query term, usually a String;requestType
- a DNS RR type as a getdns constant (listed here)extensions
- (optional) a dictionary containing attribute/value pairsGetDNSException
GetDNSFutureResult hostnameAsync(java.lang.String address, java.util.HashMap<ExtensionName,java.lang.Object> extensions) throws GetDNSException, java.net.UnknownHostException
This API call takes both IPV4 AND IPV6 address.
address
- IPV4 or IPV6 Addressextensions
- (optional) a dictionary containing attribute/value pairsGetDNSException
java.net.UnknownHostException
void run()
GetDNSFutureResult serviceAsync(java.lang.String name, java.util.HashMap<ExtensionName,java.lang.Object> extensions) throws GetDNSException
name
- domain nameextensions
- (optional) a dictionary containing attribute/value pairsGetDNSException
void close()