net.jackofalltrades.util
Class PoolablePerl5UtilFactory

java.lang.Object
  extended bynet.jackofalltrades.util.PoolablePerl5UtilFactory
All Implemented Interfaces:
org.apache.commons.pool.PoolableObjectFactory

public class PoolablePerl5UtilFactory
extends java.lang.Object
implements org.apache.commons.pool.PoolableObjectFactory

Provides functionality for creating org.apache.oro.text.perl.Perl5Util objects, because the instantiation of Perl5Util objects can be costly.

Since:
0.5-alpha
Version:
$Revision: 1.3 $ $Date: 2003/07/05 15:02:50 $
Author:
Bradley M. Handy

Field Summary
static org.apache.commons.logging.Log _log
           
 
Constructor Summary
PoolablePerl5UtilFactory()
           
 
Method Summary
 void activateObject(java.lang.Object o)
          Activates an object as it's removed from the pool.
 void destroyObject(java.lang.Object o)
          Destroys an object before it's removed from the pool for good.
 java.lang.Object makeObject()
          Creates and returns a new Perl5Util object.
 void passivateObject(java.lang.Object o)
          Passivates an object before it's returned to the pool.
 boolean validateObject(java.lang.Object o)
          Validates an object which has been activated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

public static org.apache.commons.logging.Log _log
Constructor Detail

PoolablePerl5UtilFactory

public PoolablePerl5UtilFactory()
Method Detail

activateObject

public void activateObject(java.lang.Object o)
                    throws java.lang.Exception
Activates an object as it's removed from the pool. NOTE: this operation is not supported.

Specified by:
activateObject in interface org.apache.commons.pool.PoolableObjectFactory
Parameters:
o - the object to activate.
Throws:
java.lang.Exception

destroyObject

public void destroyObject(java.lang.Object o)
                   throws java.lang.Exception
Destroys an object before it's removed from the pool for good. NOTE: this operation is not supported.

Specified by:
destroyObject in interface org.apache.commons.pool.PoolableObjectFactory
Parameters:
o - the object to destroy.
Throws:
java.lang.Exception

makeObject

public java.lang.Object makeObject()
                            throws java.lang.Exception
Creates and returns a new Perl5Util object.

Specified by:
makeObject in interface org.apache.commons.pool.PoolableObjectFactory
Returns:
a new Perl5Util object.
Throws:
java.lang.Exception

passivateObject

public void passivateObject(java.lang.Object o)
                     throws java.lang.Exception
Passivates an object before it's returned to the pool. NOTE: this operation is not supported.

Specified by:
passivateObject in interface org.apache.commons.pool.PoolableObjectFactory
Parameters:
o - the object to passivate.
Throws:
java.lang.Exception

validateObject

public boolean validateObject(java.lang.Object o)
Validates an object which has been activated. NOTE: this operation is not supported.

Specified by:
validateObject in interface org.apache.commons.pool.PoolableObjectFactory
Parameters:
o - the object to validate.
Returns:
always returns true.


Copyright © 2002-2003 Jack-of-all-trades Programming Services. All Rights Reserved.