Class DNSResolverDefault

    • Constructor Detail

      • DNSResolverDefault

        protected DNSResolverDefault()
    • Method Detail

      • isHostValid

        protected static boolean isHostValid​(String host)
      • main

        public static void main​(String[] args)
                         throws Exception
        main method outputting various information about hostnames
        Parameters:
        args - a String[] containing domains to query, if none provided default one will be used
        Throws:
        Exception
      • getDefaultHosts

        public String[] getDefaultHosts()
        Description copied from interface: DNSResolverIfc
        Method provides an array of all local host informations, by default it contains defaultHost.
        Specified by:
        getDefaultHosts in interface DNSResolverIfc
        Returns:
        an array of all local hosts.
      • getDefaultHost

        public String getDefaultHost()
        Description copied from interface: DNSResolverIfc
        Method provides default host information for the installation. It can be both hostname or IP address.
        Specified by:
        getDefaultHost in interface DNSResolverIfc
        Returns:
        a default host information.
      • getPrimaryHost

        public String getPrimaryHost()
      • setPrimaryHost

        public void setPrimaryHost​(String tigasePrimaryHost)
      • getSecondaryHost

        public String getSecondaryHost()
        Description copied from interface: DNSResolverIfc
        Method provides alternative host information for the current instance. By default falls back to the default host information.
        Specified by:
        getSecondaryHost in interface DNSResolverIfc
        Returns:
        alternative host information.
      • setSecondaryHost

        public void setSecondaryHost​(String tigaseSecondaryHost)
      • getHostSRV_Entries

        public DNSEntry[] getHostSRV_Entries​(String hostname,
                                             String service,
                                             int defPort)
                                      throws UnknownHostException
        Description copied from interface: DNSResolverIfc
        Retrieves list of DNS entries for given hostname. Allow specifying particular type of SRV record.
        Specified by:
        getHostSRV_Entries in interface DNSResolverIfc
        Parameters:
        hostname - the domain name for which this record is valid
        service - type of SRV records, for example _xmpp-server._tcp
        defPort - default port number in case DNS records is missing one.
        Returns:
        Array of the DNSEntry records
        Throws:
        UnknownHostException