com.verisign.getdns

Interface IGetDNSContextAsyncWithFuture



  • public interface IGetDNSContextAsyncWithFuture

    This interface is for calling the API asynchronously using Future.

    • Method Summary

      Methods 
      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.
    • Method Detail

      • addressAsync

        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:

        • In addressAsync(), the name argument can only take a host name.
        • You do not need to include a return_both_v4_and_v6 extension with the call in addressAsync(): it will always return both IPv4 and IPv6 addresses.
        • addressAsync() always uses all of namespaces from the context, while generalSync() only uses the DNS namespace

        Parameters:
        name - host name
        extensions - (optional) a dictionary containing attribute/value pairs
        Returns:
        GetDNSFutureResult
        Throws:
        GetDNSException
      • generalAsync

        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();
        
         
         
        Parameters:
        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 pairs
        Returns:
        GetDNSFutureResult
        Throws:
        GetDNSException
      • hostnameAsync

        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.

        Parameters:
        address - IPV4 or IPV6 Address
        extensions - (optional) a dictionary containing attribute/value pairs
        Returns:
        GetDNSFutureResult
        Throws:
        GetDNSException
        java.net.UnknownHostException
      • run

        void run()
        This method is used to wait for completion of pending DNS requests and populate the response in the future objects.
      • serviceAsync

        GetDNSFutureResult serviceAsync(java.lang.String name,
                                      java.util.HashMap<ExtensionName,java.lang.Object> extensions)
                                        throws GetDNSException
        This API call takes arguments as a domain name for an SRV lookup. The call returns the relevant SRV information for the name
        Parameters:
        name - domain name
        extensions - (optional) a dictionary containing attribute/value pairs
        Returns:
        GetDNSFutureResult
        Throws:
        GetDNSException
      • close

        void close()
        This method is used to close the current context.