org.ldaptive.pool
Class PooledConnectionFactory

java.lang.Object
  extended by org.ldaptive.pool.PooledConnectionFactory
All Implemented Interfaces:
ConnectionFactory

public class PooledConnectionFactory
extends Object
implements ConnectionFactory

Leverages a pool to obtain connections for performing ldap operations.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Constructor Summary
PooledConnectionFactory()
          Default constructor.
PooledConnectionFactory(ConnectionPool cp)
          Creates a new pooled connection factory.
 
Method Summary
 Connection getConnection()
          Returns a connection from the pool.
 ConnectionPool getConnectionPool()
          Returns the connection pool.
 void setConnectionPool(ConnectionPool cp)
          Sets the connection pool.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PooledConnectionFactory

public PooledConnectionFactory()
Default constructor.


PooledConnectionFactory

public PooledConnectionFactory(ConnectionPool cp)
Creates a new pooled connection factory.

Parameters:
cp - connection pool
Method Detail

getConnectionPool

public ConnectionPool getConnectionPool()
Returns the connection pool.

Returns:
connection pool

setConnectionPool

public void setConnectionPool(ConnectionPool cp)
Sets the connection pool.

Parameters:
cp - connection pool

getConnection

public Connection getConnection()
                         throws LdapException
Returns a connection from the pool. Connections returned from this method are ready to perform ldap operations.

Specified by:
getConnection in interface ConnectionFactory
Returns:
connection
Throws:
LdapException - if a connection cannot be retrieved from the pool

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2003-2015 Virginia Tech. All Rights Reserved.