Package org.apache.commons.pool
Class BasePoolableObjectFactory<T>
java.lang.Object
org.apache.commons.pool.BasePoolableObjectFactory<T>
- Type Parameters:
T- the type of objects held in this pool
- All Implemented Interfaces:
PoolableObjectFactory<T>
public abstract class BasePoolableObjectFactory<T>
extends Object
implements PoolableObjectFactory<T>
A base implementation of
PoolableObjectFactory.
All operations defined here are essentially no-op's.
- Since:
- Pool 1.0
- Version:
- $Revision: 1222388 $ $Date: 2011-12-22 13:28:27 -0500 (Thu, 22 Dec 2011) $
- Author:
- Rodney Waldhoff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateObject(T obj) No-op.voiddestroyObject(T obj) No-op.abstract TCreates an instance that can be served by the pool.voidpassivateObject(T obj) No-op.booleanvalidateObject(T obj) This implementation always returns true.
-
Constructor Details
-
BasePoolableObjectFactory
public BasePoolableObjectFactory()
-
-
Method Details
-
makeObject
Creates an instance that can be served by the pool. Instances returned from this method should be in the same state as if they had beenactivated. They will not be activated before being served by the pool.- Specified by:
makeObjectin interfacePoolableObjectFactory<T>- Returns:
- an instance that can be served by the pool.
- Throws:
Exception- if there is a problem creating a new instance, this will be propagated to the code requesting an object.
-
destroyObject
No-op.- Specified by:
destroyObjectin interfacePoolableObjectFactory<T>- Parameters:
obj- ignored- Throws:
Exception- should be avoided as it may be swallowed by the pool implementation.- See Also:
-
validateObject
This implementation always returns true.- Specified by:
validateObjectin interfacePoolableObjectFactory<T>- Parameters:
obj- ignored- Returns:
- true
-
activateObject
No-op.- Specified by:
activateObjectin interfacePoolableObjectFactory<T>- Parameters:
obj- ignored- Throws:
Exception- if there is a problem activatingobj, this exception may be swallowed by the pool.- See Also:
-
passivateObject
No-op.- Specified by:
passivateObjectin interfacePoolableObjectFactory<T>- Parameters:
obj- ignored- Throws:
Exception- if there is a problem passivatingobj, this exception may be swallowed by the pool.- See Also:
-