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)
Reinitialize an instance to be returned by the pool.
|
void |
destroyObject(Object key,
Object obj)
Destroy an instance no longer needed by the pool.
|
abstract Object |
makeObject(Object key)
Create an instance that can be served by the pool.
|
void |
passivateObject(Object key,
Object obj)
Uninitialize an instance to be returned to the idle object pool.
|
boolean |
validateObject(Object key,
Object obj)
Ensures that the instance is safe to be returned by the pool.
|
public abstract Object makeObject(Object key) throws Exception
makeObject in interface KeyedPoolableObjectFactorykey - the key used when constructing the objectExceptionpublic void destroyObject(Object key, Object obj) throws Exception
The default implementation is a no-op.
destroyObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the instanceobj - the instance to be destroyedExceptionpublic boolean validateObject(Object key, 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 implementationpublic void activateObject(Object key, Object obj) throws Exception
The default implementation is a no-op.
activateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be activatedExceptionpublic void passivateObject(Object key, Object obj) throws Exception
The default implementation is a no-op.
passivateObject in interface KeyedPoolableObjectFactorykey - the key used when selecting the objectobj - the instance to be passivatedExceptionCopyright © 2016. All rights reserved.