Class LdapApiServiceFactory
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory
-
public final class LdapApiServiceFactory extends Object
A factory that allows callers a means to get a handle on an LdapCodecService implementation regardless of the environment in which they're accessing it. In an OSGi environment, the BundleActivator binds the LdapCodecService class member forever to the DefaultLdapCodecService. If in In a standard standalone mode, the Bundle- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LdapApiService
getSingleton()
Gets the singleton instance of the LdapCodecService.static void
initialize(LdapApiService ldapCodecService)
Initialization can only take place once.static boolean
isInitialized()
Checks to see if the factory is initialized.static boolean
isUsingStandaloneImplementation()
Checks to see if the factory is using the standalone implementation.
-
-
-
Method Detail
-
isInitialized
public static boolean isInitialized()
Checks to see if the factory is initialized.- Returns:
- true if initialized, false otherwise
-
isUsingStandaloneImplementation
public static boolean isUsingStandaloneImplementation()
Checks to see if the factory is using the standalone implementation.- Returns:
- true if using the standalone implementation, false otherwise.
-
getSingleton
public static LdapApiService getSingleton()
Gets the singleton instance of the LdapCodecService.- Returns:
- a valid instance implementation based on environment and the availability of bindings.
-
initialize
public static void initialize(LdapApiService ldapCodecService)
Initialization can only take place once. There after an exception results.- Parameters:
ldapCodecService
- The LDAP Codec Service to initialize with.
-
-