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>

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
  • Constructor Details

    • 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 LdapConnections
      connectionFactoryClass - 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