Class 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 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.