Class DefaultPoolableLdapConnectionFactory
- java.lang.Object
-
- org.apache.directory.ldap.client.api.AbstractPoolableLdapConnectionFactory
-
- org.apache.directory.ldap.client.api.DefaultPoolableLdapConnectionFactory
-
- All Implemented Interfaces:
PooledObjectFactory<LdapConnection>
public class DefaultPoolableLdapConnectionFactory extends AbstractPoolableLdapConnectionFactory
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 -.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from class org.apache.directory.ldap.client.api.AbstractPoolableLdapConnectionFactory
connectionFactory, validator
-
-
Constructor Summary
Constructors Constructor Description DefaultPoolableLdapConnectionFactory(LdapConnectionConfig config)Creates 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 org.apache.directory.ldap.client.api.AbstractPoolableLdapConnectionFactory
activateObject, destroyObject, getLdapApiService, makeObject, newLdapConnectionFactory, passivateObject, setValidator, validateObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.pool2.PooledObjectFactory
destroyObject
-
-
-
-
Constructor Detail
-
DefaultPoolableLdapConnectionFactory
public DefaultPoolableLdapConnectionFactory(LdapConnectionConfig config)
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
public DefaultPoolableLdapConnectionFactory(LdapConnectionFactory connectionFactory)
Creates a new instance of PoolableLdapConnectionFactory.- Parameters:
connectionFactory- the connection factory for creating LdapConnections
-
-