public abstract class AbstractPoolableLdapConnectionFactory extends Object implements org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Constructor and Description |
---|
AbstractPoolableLdapConnectionFactory() |
Modifier and Type | Method and Description |
---|---|
void |
activateObject(LdapConnection connection)
There is nothing to do to activate a connection.
|
void |
destroyObject(LdapConnection connection)
Destroying a connection will unbind it which will result on a shutdown
of teh underlying protocol.
|
LdapApiService |
getLdapApiService()
Returns the LdapApiService instance used by this factory.
|
LdapConnection |
makeObject()
Specifically, we are creating a new connection based on the LdapConnection Factory
we used to create this pool of connections.
|
void |
passivateObject(LdapConnection connection)
We don't do anything with the connection.
|
void |
setValidator(LdapConnectionValidator validator)
Sets the validator to use when validation occurs.
|
boolean |
validateObject(LdapConnection connection)
Validating a connection is done by checking the connection status.
|
public AbstractPoolableLdapConnectionFactory()
public void activateObject(LdapConnection connection) throws LdapException
activateObject
in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
LdapException
public void destroyObject(LdapConnection connection) throws LdapException
destroyObject
in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
LdapException
public LdapApiService getLdapApiService()
public LdapConnection makeObject() throws LdapException
makeObject
in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
LdapException
- If unable to connect.public void passivateObject(LdapConnection connection) throws LdapException
passivateObject
in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
LdapException
- If unable to reconfigure and rebind.public void setValidator(LdapConnectionValidator validator)
setTestOnBorrow
setTestWhileIdle
setTestOnReturn
LookupLdapConnectionValidator
.validator
- The validatorpublic boolean validateObject(LdapConnection connection)
validateObject
in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.