public abstract class BaseKeyedPoolableObjectFactory extends java.lang.Object implements KeyedPoolableObjectFactory
KeyedPoolableObjectFactory.
All operations defined here are essentially no-op's.
KeyedPoolableObjectFactory| Constructor and Description |
|---|
BaseKeyedPoolableObjectFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(java.lang.Object key,
java.lang.Object obj)
Reinitialize an instance to be returned by the pool.
|
void |
destroyObject(java.lang.Object key,
java.lang.Object obj)
Destroy an instance no longer needed by the pool.
|
abstract java.lang.Object |
makeObject(java.lang.Object key)
Create an instance that can be served by the pool.
|
void |
passivateObject(java.lang.Object key,
java.lang.Object obj)
Uninitialize an instance to be returned to the idle object pool.
|
boolean |
validateObject(java.lang.Object key,
java.lang.Object obj)
Ensures that the instance is safe to be returned by the pool.
|
public void activateObject(java.lang.Object key,
java.lang.Object obj)
throws java.lang.Exception
The default implementation is a no-op.
activateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be activatedjava.lang.Exception - if there is a problem activating obj,
this exception may be swallowed by the pool.KeyedPoolableObjectFactory.destroyObject(java.lang.Object, java.lang.Object)public void destroyObject(java.lang.Object key,
java.lang.Object obj)
throws java.lang.Exception
The default implementation is a no-op.
destroyObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the instanceobj - the instance to be destroyedjava.lang.Exception - should be avoided as it may be swallowed by
the pool implementation.KeyedPoolableObjectFactory.validateObject(java.lang.Object, java.lang.Object),
KeyedObjectPool.invalidateObject(java.lang.Object, java.lang.Object)public abstract java.lang.Object makeObject(java.lang.Object key)
throws java.lang.Exception
makeObject in interface KeyedPoolableObjectFactorykey - the key used when constructing the objectjava.lang.Exception - if there is a problem creating a new instance,
this will be propagated to the code requesting an object.public void passivateObject(java.lang.Object key,
java.lang.Object obj)
throws java.lang.Exception
The default implementation is a no-op.
passivateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be passivatedjava.lang.Exception - if there is a problem passivating obj,
this exception may be swallowed by the pool.KeyedPoolableObjectFactory.destroyObject(java.lang.Object, java.lang.Object)public boolean validateObject(java.lang.Object key,
java.lang.Object obj)
The default implementation always returns true.
validateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be validatedtrue in the default implementationCopyright © 2001-2003 Apache Software Foundation. Documenation generated November 21 2014.