org.apache.directory.ldap.client.api
Class PoolableLdapConnectionFactory

java.lang.Object
  extended by org.apache.directory.ldap.client.api.PoolableLdapConnectionFactory
All Implemented Interfaces:
org.apache.commons.pool.PoolableObjectFactory<LdapConnection>

public class PoolableLdapConnectionFactory
extends Object
implements org.apache.commons.pool.PoolableObjectFactory<LdapConnection>

A factory for creating LdapConnection objects managed by LdapConnectionPool.

Author:
Apache Directory Project

Constructor Summary
PoolableLdapConnectionFactory(LdapConnectionConfig config)
          Creates a new instance of PoolableLdapConnectionFactory for the server running on localhost at the port 10389
 
Method Summary
 void activateObject(LdapConnection connection)
          
 void destroyObject(LdapConnection connection)
          
 LdapConnection makeObject()
          
 void passivateObject(LdapConnection connection)
          
 boolean validateObject(LdapConnection connection)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoolableLdapConnectionFactory

public PoolableLdapConnectionFactory(LdapConnectionConfig config)
Creates a new instance of PoolableLdapConnectionFactory for the server running on localhost at the port 10389

Parameters:
config - the configuration for creating LdapConnections
Method Detail

activateObject

public void activateObject(LdapConnection connection)
                    throws Exception

Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Throws:
Exception

destroyObject

public void destroyObject(LdapConnection connection)
                   throws Exception

Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Throws:
Exception

makeObject

public LdapConnection makeObject()
                          throws Exception

Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Throws:
Exception

passivateObject

public void passivateObject(LdapConnection connection)
                     throws Exception

Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>
Throws:
Exception

validateObject

public boolean validateObject(LdapConnection connection)

Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory<LdapConnection>


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.