java.lang.Object
org.apache.commons.pool.impl.TestGenericObjectPool.SimpleFactory
- All Implemented Interfaces:
- org.apache.commons.pool.PoolableObjectFactory
- Enclosing class:
- TestGenericObjectPool
- public class TestGenericObjectPool.SimpleFactory
- extends java.lang.Object
- implements org.apache.commons.pool.PoolableObjectFactory
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
makeCounter
int makeCounter
validateCounter
int validateCounter
evenValid
boolean evenValid
oddValid
boolean oddValid
exceptionOnPassivate
boolean exceptionOnPassivate
exceptionOnActivate
boolean exceptionOnActivate
enableValidation
boolean enableValidation
TestGenericObjectPool.SimpleFactory
public TestGenericObjectPool.SimpleFactory()
TestGenericObjectPool.SimpleFactory
public TestGenericObjectPool.SimpleFactory(boolean valid)
TestGenericObjectPool.SimpleFactory
public TestGenericObjectPool.SimpleFactory(boolean evalid,
boolean ovalid)
setValid
void setValid(boolean valid)
setEvenValid
void setEvenValid(boolean valid)
setOddValid
void setOddValid(boolean valid)
setThrowExceptionOnPassivate
public void setThrowExceptionOnPassivate(boolean bool)
makeObject
public java.lang.Object makeObject()
- Description copied from interface:
org.apache.commons.pool.PoolableObjectFactory
- Creates an instance that can be returned by the pool.
- Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory
destroyObject
public void destroyObject(java.lang.Object obj)
- Description copied from interface:
org.apache.commons.pool.PoolableObjectFactory
- Destroys an instance no longer needed by the pool.
- Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
validateObject
public boolean validateObject(java.lang.Object obj)
- Description copied from interface:
org.apache.commons.pool.PoolableObjectFactory
- Ensures that the instance is safe to be returned by the pool.
Returns false if this object should be destroyed.
- Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory
activateObject
public void activateObject(java.lang.Object obj)
throws java.lang.Exception
- Description copied from interface:
org.apache.commons.pool.PoolableObjectFactory
- Reinitialize an instance to be returned by the pool.
- Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory
passivateObject
public void passivateObject(java.lang.Object obj)
throws java.lang.Exception
- Description copied from interface:
org.apache.commons.pool.PoolableObjectFactory
- Uninitialize an instance to be returned to the pool.
- Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
isThrowExceptionOnActivate
public boolean isThrowExceptionOnActivate()
setThrowExceptionOnActivate
public void setThrowExceptionOnActivate(boolean b)
isValidationEnabled
public boolean isValidationEnabled()
setValidationEnabled
public void setValidationEnabled(boolean b)