APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.jndi.ldap

pack-priv final Class LdapDnsProviderService

extends Object
Class Inheritance
Imports
java.util.*, java.util.concurrent.locks.ReentrantLock, javax.naming.NamingException, javax.naming.ldap.spi.LdapDnsProvider, .LdapDnsProviderResult

The LdapDnsProviderService is responsible for creating and providing access to the registered LdapDnsProviders. The ServiceLoader is used to find and register any implementations of LdapDnsProvider.

Instances of this class are safe for use by multiple threads.

Field Summary

Modifier and TypeField and Description
private static final ReentrantLock
private final ServiceLoader<LdapDnsProvider>
private static volatile LdapDnsProviderService

Constructor Summary

AccessConstructor and Description
private
LdapDnsProviderService()

Creates a new instance of LdapDnsProviderService

Method Summary

Modifier and TypeMethod and Description
pack-priv static LdapDnsProviderService
getInstance()

Retrieves the singleton instance of LdapDnsProviderService.

pack-priv LdapDnsProviderResult
lookupEndpoints(String url, Hashtable<?, ?> env)

Retrieves result from the first provider that successfully resolves the endpoints.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOCKback to summary
private static final ReentrantLock LOCK
providersback to summary
private final ServiceLoader<LdapDnsProvider> providers
serviceback to summary
private static volatile LdapDnsProviderService service

Constructor Detail

LdapDnsProviderServiceback to summary
private LdapDnsProviderService()

Creates a new instance of LdapDnsProviderService

Method Detail

getInstanceback to summary
pack-priv static LdapDnsProviderService getInstance()

Retrieves the singleton instance of LdapDnsProviderService.

lookupEndpointsback to summary
pack-priv LdapDnsProviderResult lookupEndpoints(String url, Hashtable<?, ?> env) throws NamingException

Retrieves result from the first provider that successfully resolves the endpoints. If no results are found when calling installed subclasses of LdapDnsProvider then this method will fall back to the DefaultLdapDnsProvider.

Exceptions
NamingException:
if the url is not valid or an error occurred while performing the lookup.