com.cafesoft.core.jdbc
Interface ConnectionPoolManager

All Superinterfaces:
Debuggable, LoggerClient
All Known Implementing Classes:
StandardConnectionPoolManager

public interface ConnectionPoolManager
extends LoggerClient, Debuggable

Interface that defines an Object that manages a collection of Object pools.

Since:
10/31/02
See Also:
ConnectionPool

Method Summary
 void addPool(String poolName, ConnectionPool pool)
          Add a ConnectionPool to the Manager
 void close()
          Close the ConnectionPoolManager NOTE: Once the manager is closed it cannot be restarted The close method will remove all ConnectionPools from any internal lists and will close them.
 ConnectionPoolManagerInfo getInfo()
          Get information about the ConnectionPoolManager
 ConnectionPool getPool(String poolName, Properties info)
          Get the ConnectionPool with the given poolName
 String[] getPoolNames()
          Get all of the ConnectionPool names within the Manager
 ConnectionPool[] getPools()
          Get all ConnectionPools within the Manager
 boolean poolExists(String poolName)
          Determine if a ConnectionPool with the given name exists in the Manager
 ConnectionPool removePool(String poolName)
          Remove a ConnectionPool from the Manager
 
Methods inherited from interface com.cafesoft.core.log.LoggerClient
setLogger
 
Methods inherited from interface com.cafesoft.core.util.Debuggable
setDebug
 

Method Detail

getInfo

public ConnectionPoolManagerInfo getInfo()
Get information about the ConnectionPoolManager

Returns:
a ConnectionPoolManagerInfo object containing the current state of the ConnectionPoolManager

addPool

public void addPool(String poolName,
                    ConnectionPool pool)
             throws ConnectionPoolException
Add a ConnectionPool to the Manager

Parameters:
poolName - the name of the pool
pool - the ConnectionPool object to add
Throws:
ConnectionPoolException - thrown if a ConnectionPool is already registered with the same name

removePool

public ConnectionPool removePool(String poolName)
Remove a ConnectionPool from the Manager

Parameters:
poolName - the name of the ConnectionPool to remove
Returns:
the ConnectionPool that was just removed. If the pool does not exist then method will return null.

getPools

public ConnectionPool[] getPools()
Get all ConnectionPools within the Manager

Returns:
an array of all managed ConnectionPools. If the manager does not contain any ConnectionPools a zero-length array will be returned

getPoolNames

public String[] getPoolNames()
Get all of the ConnectionPool names within the Manager

Returns:
an array of all managed ConnectionPool names. If the manager does not contain any ConnectionPools a zero-length array will be returned

getPool

public ConnectionPool getPool(String poolName,
                              Properties info)
                       throws ConnectionPoolException
Get the ConnectionPool with the given poolName

Parameters:
poolName - the poolName of the ConnectionPool to get
info - Properties object which may contain authentication material. If authentication materials are included the two expected values are "user" and "password"
Returns:
the ConnectionPool if it exists, null otherwise
Throws:
ConnectionPoolException - thrown if authentication fails

poolExists

public boolean poolExists(String poolName)
Determine if a ConnectionPool with the given name exists in the Manager

Parameters:
poolName - the name of the ConnectionPool to check
Returns:
true if a pool with the same name already exists in the manager, false otherwise

close

public void close()
Close the ConnectionPoolManager

NOTE: Once the manager is closed it cannot be restarted

The close method will remove all ConnectionPools from any internal lists and will close them.



Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.