com.verisign.getdns

Interface IGetDNSContextSync



  • public interface IGetDNSContextSync

    This interface is for calling the API synchronously.

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.util.HashMap<java.lang.String,java.lang.Object> addressSync(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.
      java.util.HashMap<java.lang.String,java.lang.Object> generalSync(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.
      java.util.HashMap<java.lang.String,java.lang.Object> hostnameSync(java.lang.String address, java.util.HashMap<ExtensionName,java.lang.Object> extensions)
      This API call takes both IPV4 AND IPV6 address.
      java.util.HashMap<java.lang.String,java.lang.Object> serviceSync(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

      • addressSync

        java.util.HashMap<java.lang.String,java.lang.Object> addressSync(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 addressSync() and getdnsSync() beyond the missing request_type argument:

        • In addressSync(), 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 addressSync(): it will always return both IPv4 and IPv6 addresses.
        • addressSync() 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:
        DNS response
        Throws:
        GetDNSException
      • generalSync

        java.util.HashMap<java.lang.String,java.lang.Object> generalSync(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.

         HashMap<String, Object> info = context.generalSync("getdnsapi.net", RRType.valueOf("CNAME"), null);
         
         
         
        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:
        DNS response
        Throws:
        GetDNSException
      • hostnameSync

        java.util.HashMap<java.lang.String,java.lang.Object> hostnameSync(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.

         HashMap<String, Object> info = context.hostnameSync("2001:4860:4860::8888", null);
         
         
         
        Parameters:
        address - IPV4 or IPV6 Address
        extensions - (optional) a dictionary containing attribute/value pairs
        Returns:
        DNS response
        Throws:
        GetDNSException
        java.net.UnknownHostException
      • serviceSync

        java.util.HashMap<java.lang.String,java.lang.Object> serviceSync(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:
        DNS response
        Throws:
        GetDNSException
      • close

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