Class DefaultDNSContextFactory

  • All Implemented Interfaces:
    DNSContextFactory

    public class DefaultDNSContextFactory
    extends Object
    implements DNSContextFactory
    Provides the default implementation of the JNDI context factory for DNS queries.
    • Field Detail

      • DEFAULT_DNS_PROVIDER_URL

        public static final String DEFAULT_DNS_PROVIDER_URL
        Default provider URL for DNS, determines DNS from the underlying OS. Value is "dns:".
        See Also:
        Constant Field Values
      • nameservers

        private final List<String> nameservers
        DNS name servers in order of preference.
    • Constructor Detail

      • DefaultDNSContextFactory

        public DefaultDNSContextFactory​(String... servers)
        Creates a new instance that resolves DNS names using the given name servers.
        Parameters:
        servers - name servers in order of preference.