Package edu.vt.middleware.ldap.pool
Class AbstractLdapFactory<T extends BaseLdap>
- java.lang.Object
-
- edu.vt.middleware.ldap.pool.AbstractLdapFactory<T>
-
- Type Parameters:
T
- type of ldap object
- All Implemented Interfaces:
LdapFactory<T>
- Direct Known Subclasses:
DefaultLdapFactory
public abstract class AbstractLdapFactory<T extends BaseLdap> extends java.lang.Object implements LdapFactory<T>
AbstractLdapFactory
provides a basic 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 Modifier and Type Field Description protected LdapActivator<T>
activator
For activating ldap objects.protected org.apache.commons.logging.Log
logger
Log for this class.protected LdapPassivator<T>
passivator
For passivating ldap objects.protected LdapValidator<T>
validator
For validating ldap objects.
-
Constructor Summary
Constructors Constructor Description AbstractLdapFactory()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
activate(T t)
Prepare the supplied object for placement in the pool.abstract T
create()
Create a new ldap object.abstract void
destroy(T t)
Destroy an ldap object.LdapActivator<T>
getLdapActivator()
Returns the ldap activator for this factory.LdapPassivator<T>
getLdapPassivator()
Returns the ldap passivator for this factory.LdapValidator<T>
getLdapValidator()
Returns the ldap validator for this factory.boolean
passivate(T t)
Prepare the supplied object for removal from the pool.void
setLdapActivator(LdapActivator<T> la)
Sets the ldap activator for this factory.void
setLdapPassivator(LdapPassivator<T> lp)
Sets the ldap passivator for this factory.void
setLdapValidator(LdapValidator<T> lv)
Sets the ldap validator for this factory.boolean
validate(T t)
Verify an ldap object is still viable for use in the pool.
-
-
-
Field Detail
-
logger
protected final org.apache.commons.logging.Log logger
Log for this class.
-
activator
protected LdapActivator<T extends BaseLdap> activator
For activating ldap objects.
-
passivator
protected LdapPassivator<T extends BaseLdap> passivator
For passivating ldap objects.
-
validator
protected LdapValidator<T extends BaseLdap> validator
For validating ldap objects.
-
-
Method Detail
-
setLdapActivator
public void setLdapActivator(LdapActivator<T> la)
Sets the ldap activator for this factory.- Parameters:
la
- ldap activator
-
getLdapActivator
public LdapActivator<T> getLdapActivator()
Returns the ldap activator for this factory.- Returns:
- ldap activator
-
setLdapPassivator
public void setLdapPassivator(LdapPassivator<T> lp)
Sets the ldap passivator for this factory.- Parameters:
lp
- ldap passivator
-
getLdapPassivator
public LdapPassivator<T> getLdapPassivator()
Returns the ldap passivator for this factory.- Returns:
- ldap passivator
-
setLdapValidator
public void setLdapValidator(LdapValidator<T> lv)
Sets the ldap validator for this factory.- Parameters:
lv
- ldap validator
-
getLdapValidator
public LdapValidator<T> getLdapValidator()
Returns the ldap validator for this factory.- Returns:
- ldap validator
-
create
public abstract T create()
Create a new ldap object.- Specified by:
create
in interfaceLdapFactory<T extends BaseLdap>
- Returns:
- ldap object
-
destroy
public abstract void destroy(T t)
Destroy an ldap object.- Specified by:
destroy
in interfaceLdapFactory<T extends BaseLdap>
- Parameters:
t
- ldap object
-
activate
public boolean activate(T t)
Prepare the supplied object for placement in the pool.- Specified by:
activate
in interfaceLdapFactory<T extends BaseLdap>
- Parameters:
t
- ldap object- Returns:
- whether the supplied object successfully activated
-
passivate
public boolean passivate(T t)
Prepare the supplied object for removal from the pool.- Specified by:
passivate
in interfaceLdapFactory<T extends BaseLdap>
- Parameters:
t
- ldap object- Returns:
- whether the supplied object successfully passivated
-
validate
public boolean validate(T t)
Verify an ldap object is still viable for use in the pool.- Specified by:
validate
in interfaceLdapFactory<T extends BaseLdap>
- Parameters:
t
- ldap object- Returns:
- whether the supplied object is ready for use
-
-