Class DNSServiceResolverImpl

    • Constructor Detail

      • DNSServiceResolverImpl

        protected DNSServiceResolverImpl()
    • Method Detail

      • resolveDnsServiceRecord

        protected List<DNSServiceEntry> resolveDnsServiceRecord​(String service,
                                                                String domain)
                                                         throws NamingException
        Returns the host name and port that a server providing the specified service can be reached at. A DNS lookup for a SRV record in the form "_service.example.com" is attempted.

        As an example, a lookup for "example.com" for the service _gc._tcp may return "dc01.example.com:3268".

        Parameters:
        service - the service.
        domain - the domain.
        Returns:
        a List of DNSServiceEntrys, which encompasses the hostname and port that the server can be reached at for the specified domain.
        Throws:
        NamingException - if the DNS server is unreachable