org.apache.directory.api.ldap.codec.api
Class LdapApiServiceFactory

java.lang.Object
  extended by org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory

public 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

Constructor Summary
LdapApiServiceFactory()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapApiServiceFactory

public LdapApiServiceFactory()
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.


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.