org.apache.commons.pool
Class BaseKeyedPoolableObjectFactory

java.lang.Object
  |
  +--org.apache.commons.pool.BaseKeyedPoolableObjectFactory
All Implemented Interfaces:
KeyedPoolableObjectFactory

public abstract class BaseKeyedPoolableObjectFactory
extends Object
implements KeyedPoolableObjectFactory

A base implemenation of KeyedPoolableObjectFactory.

All operations defined here are essentially no-op's.

Version:
$Revision: 1.3 $ $Date: 2002/03/26 12:34:24 $
Author:
Rodney Waldhoff
See Also:
KeyedPoolableObjectFactory

Constructor Summary
BaseKeyedPoolableObjectFactory()
           
 
Method Summary
 void activateObject(Object key, Object obj)
          No-op.
 void destroyObject(Object key, Object obj)
          No-op.
abstract  Object makeObject(Object key)
          Create an instance that can be served by the pool.
 void passivateObject(Object key, Object obj)
          No-op.
 boolean validateObject(Object key, Object obj)
          This implementation always returns true.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseKeyedPoolableObjectFactory

public BaseKeyedPoolableObjectFactory()
Method Detail

activateObject

public void activateObject(Object key,
                           Object obj)
                    throws Exception
No-op.

Specified by:
activateObject in interface KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the object
obj - the instance to be activated
Exception

destroyObject

public void destroyObject(Object key,
                          Object obj)
                   throws Exception
No-op.

Specified by:
destroyObject in interface KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the instance
obj - the instance to be destroyed
Exception

makeObject

public abstract Object makeObject(Object key)
                           throws Exception
Description copied from interface: KeyedPoolableObjectFactory
Create an instance that can be served by the pool.

Specified by:
makeObject in interface KeyedPoolableObjectFactory
Parameters:
key - the key used when constructing the object
Returns:
an instance that can be served by the pool.
Exception

passivateObject

public void passivateObject(Object key,
                            Object obj)
                     throws Exception
No-op.

Specified by:
passivateObject in interface KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the object
obj - the instance to be passivated
Exception

validateObject

public boolean validateObject(Object key,
                              Object obj)
This implementation always returns true.

Specified by:
validateObject in interface KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the object
obj - the instance to be validated
Returns:
true


Copyright © 2001-2002 Apache Software Foundation. Documenation generated February 22 2003.