Class PoolableUnboundConnectionFactory
java.lang.Object
org.apache.commons.pool2.BaseObject
org.apache.commons.pool2.BasePooledObjectFactory<org.apache.directory.ldap.client.api.LdapConnection>
org.apache.jackrabbit.oak.security.authentication.ldap.impl.PoolableUnboundConnectionFactory
- All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<org.apache.directory.ldap.client.api.LdapConnection>
public class PoolableUnboundConnectionFactory
extends org.apache.commons.pool2.BasePooledObjectFactory<org.apache.directory.ldap.client.api.LdapConnection>
A factory for creating unbound LdapConnection objects managed by LdapConnectionPool.
-
Constructor Summary
ConstructorsConstructorDescriptionPoolableUnboundConnectionFactory
(org.apache.directory.ldap.client.api.LdapConnectionConfig config) Creates a new instance of PoolableUnboundConnectionFactory -
Method Summary
Modifier and TypeMethodDescriptionvoid
activateObject
(org.apache.directory.ldap.client.api.LdapConnection connection) org.apache.directory.ldap.client.api.LdapConnection
create()
void
destroyObject
(org.apache.directory.ldap.client.api.LdapConnection connection) org.apache.directory.ldap.client.api.LdapConnectionValidator
gets the connection validatorvoid
passivateObject
(org.apache.directory.ldap.client.api.LdapConnection connection) void
setValidator
(org.apache.directory.ldap.client.api.LdapConnectionValidator validator) Sets the connection validator that is used when the connection is taken out of the poolboolean
validateObject
(org.apache.directory.ldap.client.api.LdapConnection connection) org.apache.commons.pool2.PooledObject<org.apache.directory.ldap.client.api.LdapConnection>
wrap
(org.apache.directory.ldap.client.api.LdapConnection foo) Methods inherited from class org.apache.commons.pool2.BasePooledObjectFactory
activateObject, destroyObject, makeObject, passivateObject, validateObject
Methods inherited from class org.apache.commons.pool2.BaseObject
toString, toStringAppendFields
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
Constructor Details
-
PoolableUnboundConnectionFactory
public PoolableUnboundConnectionFactory(org.apache.directory.ldap.client.api.LdapConnectionConfig config) Creates a new instance of PoolableUnboundConnectionFactory- Parameters:
config
- the configuration for creating LdapConnections
-
-
Method Details
-
getValidator
public org.apache.directory.ldap.client.api.LdapConnectionValidator getValidator()gets the connection validator- Returns:
- the connection validator
-
setValidator
public void setValidator(org.apache.directory.ldap.client.api.LdapConnectionValidator validator) Sets the connection validator that is used when the connection is taken out of the pool- Parameters:
validator
- the validator
-
activateObject
public void activateObject(org.apache.directory.ldap.client.api.LdapConnection connection) -
destroyObject
public void destroyObject(org.apache.directory.ldap.client.api.LdapConnection connection) throws IOException - Throws:
IOException
-
create
public org.apache.directory.ldap.client.api.LdapConnection create() throws org.apache.directory.api.ldap.model.exception.LdapException- Specified by:
create
in classorg.apache.commons.pool2.BasePooledObjectFactory<org.apache.directory.ldap.client.api.LdapConnection>
- Throws:
org.apache.directory.api.ldap.model.exception.LdapException
-
wrap
public org.apache.commons.pool2.PooledObject<org.apache.directory.ldap.client.api.LdapConnection> wrap(org.apache.directory.ldap.client.api.LdapConnection foo) - Specified by:
wrap
in classorg.apache.commons.pool2.BasePooledObjectFactory<org.apache.directory.ldap.client.api.LdapConnection>
-
passivateObject
public void passivateObject(org.apache.directory.ldap.client.api.LdapConnection connection) -
validateObject
public boolean validateObject(org.apache.directory.ldap.client.api.LdapConnection connection)
-