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
Following copied from interface: org.apache.commons.pool.KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the object
obj - the instance to be activated

destroyObject

public void destroyObject(Object key,
                          Object obj)
                   throws Exception
No-op.
Specified by:
destroyObject in interface KeyedPoolableObjectFactory
Following copied from interface: org.apache.commons.pool.KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the instance
obj - the instance to be destroyed

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
Following copied from interface: org.apache.commons.pool.KeyedPoolableObjectFactory
Parameters:
key - the key used when constructing the object
Returns:
an instance that can be served by the pool.

passivateObject

public void passivateObject(Object key,
                            Object obj)
                     throws Exception
No-op.
Specified by:
passivateObject in interface KeyedPoolableObjectFactory
Following copied from interface: org.apache.commons.pool.KeyedPoolableObjectFactory
Parameters:
key - the key used when selecting the object
obj - the instance to be passivated

validateObject

public boolean validateObject(Object key,
                              Object obj)
This implementation always returns true.
Specified by:
validateObject in interface KeyedPoolableObjectFactory
Returns:
true


Copyright © 2001-2002 Apache Software Foundation. Documenation generated July 21 2002.