org.apache.commons.pool
public abstract class BaseKeyedPoolableObjectFactory extends 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(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.
|
public void activateObject(Object key, Object obj) throws Exception
activateObject
in interface KeyedPoolableObjectFactory
key
- the key used when selecting the objectobj
- the instance to be activatedException
public void destroyObject(Object key, Object obj) throws Exception
destroyObject
in interface KeyedPoolableObjectFactory
key
- the key used when selecting the instanceobj
- the instance to be destroyedException
public abstract Object makeObject(Object key) throws Exception
KeyedPoolableObjectFactory
makeObject
in interface KeyedPoolableObjectFactory
key
- the key used when constructing the objectException
public void passivateObject(Object key, Object obj) throws Exception
passivateObject
in interface KeyedPoolableObjectFactory
key
- the key used when selecting the objectobj
- the instance to be passivatedException
public boolean validateObject(Object key, Object obj)
validateObject
in interface KeyedPoolableObjectFactory
key
- the key used when selecting the objectobj
- the instance to be validatedCopyright © 2001-2003 Apache Software Foundation. Documenation generated June 28 2015.