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