public abstract class BasePoolableObjectFactory extends java.lang.Object implements PoolableObjectFactory
PoolableObjectFactory
.
All operations defined here are essentially no-op's.
PoolableObjectFactory
,
BaseKeyedPoolableObjectFactory
Constructor and Description |
---|
BasePoolableObjectFactory() |
Modifier and Type | Method and Description |
---|---|
void |
activateObject(java.lang.Object obj)
No-op.
|
void |
destroyObject(java.lang.Object obj)
No-op.
|
abstract java.lang.Object |
makeObject()
Creates an instance that can be served by the pool.
|
void |
passivateObject(java.lang.Object obj)
No-op.
|
boolean |
validateObject(java.lang.Object obj)
This implementation always returns true.
|
public void activateObject(java.lang.Object obj) throws java.lang.Exception
activateObject
in interface PoolableObjectFactory
obj
- the instance to be activatedjava.lang.Exception
- if there is a problem activating obj
,
this exception may be swallowed by the pool.PoolableObjectFactory.destroyObject(java.lang.Object)
public void destroyObject(java.lang.Object obj) throws java.lang.Exception
destroyObject
in interface PoolableObjectFactory
obj
- the instance to be destroyedjava.lang.Exception
- should be avoided as it may be swallowed by
the pool implementation.PoolableObjectFactory.validateObject(java.lang.Object)
,
ObjectPool.invalidateObject(java.lang.Object)
public abstract java.lang.Object makeObject() throws java.lang.Exception
PoolableObjectFactory
activated
. They will not be
activated before being served by the pool.makeObject
in interface PoolableObjectFactory
java.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 obj) throws java.lang.Exception
passivateObject
in interface PoolableObjectFactory
obj
- the instance to be passivatedjava.lang.Exception
- if there is a problem passivating obj
,
this exception may be swallowed by the pool.PoolableObjectFactory.destroyObject(java.lang.Object)
public boolean validateObject(java.lang.Object obj)
validateObject
in interface PoolableObjectFactory
obj
- the instance to be validatedCopyright © 2001-2003 Apache Software Foundation. Documenation generated February 19 2016.