Keel 2.1RC2

org.apache.excalibur.mpool.test
Class ClassInstanceObjectFactory

java.lang.Object
  extended byorg.apache.excalibur.mpool.test.ClassInstanceObjectFactory
All Implemented Interfaces:
ObjectFactory, ObjectFactory

public class ClassInstanceObjectFactory
extends java.lang.Object
implements ObjectFactory, ObjectFactory

Since:
4.1
Version:
CVS $Revision: 1.4 $ $Date: 2004/02/28 11:47:32 $
Author:

Field Summary
private  java.lang.Class m_clazz
           
private  int m_id
           
private  java.util.HashMap m_instances
           
private  Logger m_logger
           
 
Fields inherited from interface org.apache.excalibur.mpool.ObjectFactory
ROLE
 
Constructor Summary
ClassInstanceObjectFactory(java.lang.Class clazz, Logger logger)
          Creates a reproducable log of activity in the provided StringBuffer
 
Method Summary
 void decommission(java.lang.Object object)
           
 void dispose(java.lang.Object object)
          Performs any deconstruction that is necessary for the object.
 java.lang.Class getCreatedClass()
          Get the class of the object you are creating.
 java.lang.Object newInstance()
          Create a new instance of the object being pooled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_instances

private java.util.HashMap m_instances

m_logger

private Logger m_logger

m_clazz

private java.lang.Class m_clazz

m_id

private int m_id
Constructor Detail

ClassInstanceObjectFactory

public ClassInstanceObjectFactory(java.lang.Class clazz,
                                  Logger logger)
Creates a reproducable log of activity in the provided StringBuffer

Method Detail

newInstance

public java.lang.Object newInstance()
                             throws java.lang.Exception
Description copied from interface: ObjectFactory
Create a new instance of the object being pooled.

Specified by:
newInstance in interface ObjectFactory
Returns:
the pooled Object instance
Throws:
java.lang.Exception - if the object cannot be instantiated

getCreatedClass

public java.lang.Class getCreatedClass()
Description copied from interface: ObjectFactory
Get the class of the object you are creating.

Specified by:
getCreatedClass in interface ObjectFactory
Returns:
Class object of the factory's class

dispose

public void dispose(java.lang.Object object)
             throws java.lang.Exception
Description copied from interface: ObjectFactory
Performs any deconstruction that is necessary for the object.

Specified by:
dispose in interface ObjectFactory
Parameters:
object - to destroy
Throws:
java.lang.Exception - if there is any other reason that the factory has problems disposing of the object.

decommission

public void decommission(java.lang.Object object)
                  throws java.lang.Exception
Specified by:
decommission in interface ObjectFactory
Throws:
java.lang.Exception

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.