Class DefaultPoolableLdapConnectionFactory
java.lang.Object
org.apache.directory.ldap.client.api.AbstractPoolableLdapConnectionFactory
org.apache.directory.ldap.client.api.DefaultPoolableLdapConnectionFactory
- All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<LdapConnection>
A factory for creating LdapConnection objects managed by LdapConnectionPool. The connections are
not validated when they are pulled from the pool : we just check if they are still connected, using
their internal flag. We don't either re-bind when we push back the connection into the pool.
It's up to the users to be careful with the way they deal with connections -especially when using the StartTLS extended operation -.
It's up to the users to be careful with the way they deal with connections -especially when using the StartTLS extended operation -.
- Author:
- Apache Directory Project
-
Field Summary
Fields inherited from class AbstractPoolableLdapConnectionFactory
connectionFactory, validator -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of PoolableLdapConnectionFactory.DefaultPoolableLdapConnectionFactory(LdapConnectionConfig config, Class<? extends LdapConnectionFactory> connectionFactoryClass) Creates a new instance of PoolableLdapConnectionFactory using an instance of the supplied class as its LdapConnection factory.DefaultPoolableLdapConnectionFactory(LdapConnectionFactory connectionFactory) Creates a new instance of PoolableLdapConnectionFactory. -
Method Summary
Methods inherited from class AbstractPoolableLdapConnectionFactory
activateObject, destroyObject, getLdapApiService, makeObject, newLdapConnectionFactory, passivateObject, setValidator, validateObjectMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
Constructor Details
-
DefaultPoolableLdapConnectionFactory
Creates a new instance of PoolableLdapConnectionFactory.- Parameters:
config- the configuration for creating LdapConnections
-
DefaultPoolableLdapConnectionFactory
public DefaultPoolableLdapConnectionFactory(LdapConnectionConfig config, Class<? extends LdapConnectionFactory> connectionFactoryClass) Creates a new instance of PoolableLdapConnectionFactory using an instance of the supplied class as its LdapConnection factory.- Parameters:
config- the configuration for creating LdapConnectionsconnectionFactoryClass- the class used as a factory for connections
-
DefaultPoolableLdapConnectionFactory
Creates a new instance of PoolableLdapConnectionFactory.- Parameters:
connectionFactory- the connection factory for creating LdapConnections
-