Package edu.vt.middleware.ldap.pool
Class DefaultLdapFactory
- java.lang.Object
-
- edu.vt.middleware.ldap.pool.AbstractLdapFactory<Ldap>
-
- edu.vt.middleware.ldap.pool.DefaultLdapFactory
-
- All Implemented Interfaces:
LdapFactory<Ldap>
public class DefaultLdapFactory extends AbstractLdapFactory<Ldap>
DefaultLdapFactoryprovides a simple implementation of an ldap factory.- Version:
- $Revision: 1330 $ $Date: 2010-05-24 00:10:53 +0200 (Mon, 24 May 2010) $
- Author:
- Middleware Services
-
-
Field Summary
-
Fields inherited from class edu.vt.middleware.ldap.pool.AbstractLdapFactory
activator, logger, passivator, validator
-
-
Constructor Summary
Constructors Constructor Description DefaultLdapFactory()This creates a newDefaultLdapFactorywith the default properties file, which must be located in your classpath.DefaultLdapFactory(LdapConfig lc)This creates a newDefaultLdapFactorywith the supplied ldap configuration.DefaultLdapFactory(java.io.InputStream is)This creates a newDefaultLdapFactorywith the supplied input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ldapcreate()Create a new ldap object.voiddestroy(Ldap l)Destroy an ldap object.booleangetConnectOnCreate()Returns whether ldap objects will attempt to connect after creation.voidsetConnectOnCreate(boolean b)This sets whether newly created ldap objects will attempt to connect.-
Methods inherited from class edu.vt.middleware.ldap.pool.AbstractLdapFactory
activate, getLdapActivator, getLdapPassivator, getLdapValidator, passivate, setLdapActivator, setLdapPassivator, setLdapValidator, validate
-
-
-
-
Constructor Detail
-
DefaultLdapFactory
public DefaultLdapFactory()
This creates a newDefaultLdapFactorywith the default properties file, which must be located in your classpath.
-
DefaultLdapFactory
public DefaultLdapFactory(java.io.InputStream is)
This creates a newDefaultLdapFactorywith the supplied input stream.- Parameters:
is-InputStream
-
DefaultLdapFactory
public DefaultLdapFactory(LdapConfig lc)
This creates a newDefaultLdapFactorywith the supplied ldap configuration. The ldap configuration will be marked as immutable by this factory.- Parameters:
lc- ldap config
-
-
Method Detail
-
getConnectOnCreate
public boolean getConnectOnCreate()
Returns whether ldap objects will attempt to connect after creation. Default is true.- Returns:
boolean
-
setConnectOnCreate
public void setConnectOnCreate(boolean b)
This sets whether newly created ldap objects will attempt to connect. Default is true.- Parameters:
b- connect on create
-
create
public Ldap create()
Create a new ldap object.- Specified by:
createin interfaceLdapFactory<Ldap>- Specified by:
createin classAbstractLdapFactory<Ldap>- Returns:
- ldap object
-
destroy
public void destroy(Ldap l)
Destroy an ldap object.- Specified by:
destroyin interfaceLdapFactory<Ldap>- Specified by:
destroyin classAbstractLdapFactory<Ldap>- Parameters:
l- ldap object
-
-