|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.pool.BaseKeyedPoolableObjectFactory
public abstract class BaseKeyedPoolableObjectFactory
A base implementation of KeyedPoolableObjectFactory.
All operations defined here are essentially no-op's.
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseKeyedPoolableObjectFactory()
| Method Detail |
|---|
public abstract Object makeObject(Object key)
throws Exception
KeyedPoolableObjectFactoryactivated. They will not be
activated before being served by the pool.
makeObject in interface KeyedPoolableObjectFactorykey - the key used when constructing the object
Exception - if there is a problem creating a new instance,
this will be propagated to the code requesting an object.
public void destroyObject(Object key,
Object obj)
throws Exception
destroyObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the instanceobj - the instance to be destroyed
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 boolean validateObject(Object key,
Object obj)
validateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be validated
public void activateObject(Object key,
Object obj)
throws Exception
activateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be activated
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 passivateObject(Object key,
Object obj)
throws Exception
passivateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be passivated
Exception - if there is a problem passivating obj,
this exception may be swallowed by the pool.KeyedPoolableObjectFactory.destroyObject(java.lang.Object, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||