Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.pool.impl
Class TestGenericObjectPool.SimpleFactory  view TestGenericObjectPool.SimpleFactory download TestGenericObjectPool.SimpleFactory.java

java.lang.Object
  extended byorg.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


Field Summary
(package private)  boolean enableValidation
           
(package private)  boolean evenValid
           
(package private)  boolean exceptionOnActivate
           
(package private)  boolean exceptionOnPassivate
           
(package private)  int makeCounter
           
(package private)  boolean oddValid
           
(package private)  int validateCounter
           
 
Constructor Summary
TestGenericObjectPool.SimpleFactory()
           
TestGenericObjectPool.SimpleFactory(boolean valid)
           
TestGenericObjectPool.SimpleFactory(boolean evalid, boolean ovalid)
           
 
Method Summary
 void activateObject(java.lang.Object obj)
          Reinitialize an instance to be returned by the pool.
 void destroyObject(java.lang.Object obj)
          Destroys an instance no longer needed by the pool.
 boolean isThrowExceptionOnActivate()
           
 boolean isValidationEnabled()
           
 java.lang.Object makeObject()
          Creates an instance that can be returned by the pool.
 void passivateObject(java.lang.Object obj)
          Uninitialize an instance to be returned to the pool.
(package private)  void setEvenValid(boolean valid)
           
(package private)  void setOddValid(boolean valid)
           
 void setThrowExceptionOnActivate(boolean b)
           
 void setThrowExceptionOnPassivate(boolean bool)
           
(package private)  void setValid(boolean valid)
           
 void setValidationEnabled(boolean b)
           
 boolean validateObject(java.lang.Object obj)
          Ensures that the instance is safe to be returned by the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

makeCounter

int makeCounter

validateCounter

int validateCounter

evenValid

boolean evenValid

oddValid

boolean oddValid

exceptionOnPassivate

boolean exceptionOnPassivate

exceptionOnActivate

boolean exceptionOnActivate

enableValidation

boolean enableValidation
Constructor Detail

TestGenericObjectPool.SimpleFactory

public TestGenericObjectPool.SimpleFactory()

TestGenericObjectPool.SimpleFactory

public TestGenericObjectPool.SimpleFactory(boolean valid)

TestGenericObjectPool.SimpleFactory

public TestGenericObjectPool.SimpleFactory(boolean evalid,
                                           boolean ovalid)
Method Detail

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)