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>
DefaultLdapFactory
provides 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 newDefaultLdapFactory
with the default properties file, which must be located in your classpath.DefaultLdapFactory(LdapConfig lc)
This creates a newDefaultLdapFactory
with the supplied ldap configuration.DefaultLdapFactory(java.io.InputStream is)
This creates a newDefaultLdapFactory
with the supplied input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ldap
create()
Create a new ldap object.void
destroy(Ldap l)
Destroy an ldap object.boolean
getConnectOnCreate()
Returns whether ldap objects will attempt to connect after creation.void
setConnectOnCreate(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 newDefaultLdapFactory
with the default properties file, which must be located in your classpath.
-
DefaultLdapFactory
public DefaultLdapFactory(java.io.InputStream is)
This creates a newDefaultLdapFactory
with the supplied input stream.- Parameters:
is
-InputStream
-
DefaultLdapFactory
public DefaultLdapFactory(LdapConfig lc)
This creates a newDefaultLdapFactory
with 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:
create
in interfaceLdapFactory<Ldap>
- Specified by:
create
in classAbstractLdapFactory<Ldap>
- Returns:
- ldap object
-
destroy
public void destroy(Ldap l)
Destroy an ldap object.- Specified by:
destroy
in interfaceLdapFactory<Ldap>
- Specified by:
destroy
in classAbstractLdapFactory<Ldap>
- Parameters:
l
- ldap object
-
-