|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sadun.util.pool.ObjectPool.BaseFactory
org.sadun.util.pool.ObjectPool.ObjectFactory
An ExtendedObjectPool.Factory implementation which uses reflection
to create instances of a certain class.
After creation, objects can be optionally setup by an user-provided class implementing
the Setup interface.
| Field Summary |
| Fields inherited from class org.sadun.util.pool.ObjectPool.BaseFactory |
cls, paramCls, params, ps |
| Constructor Summary | |
ObjectPool.ObjectFactory(java.lang.Class cls,
java.lang.Object[] params,
Setup ps)
Create a factory which will construct object of the given class, with the given parameters, using the given Setup object.
|
|
ObjectPool.ObjectFactory(java.lang.String clsName,
java.lang.Object[] params,
Setup ps)
Create a factory which will construct object of the given class, with the given parameters, using the given Setup object.
|
|
| Method Summary | |
java.lang.Object |
create()
Create an instance of the class defined at construction, using the (optional) parameters and the (optional) Setup object defined at construction for construction
and post-construction initialization. |
void |
destroy(java.lang.Object obj)
This implementation does not do anything. |
| Methods inherited from class org.sadun.util.pool.ObjectPool.BaseFactory |
getProducedClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ObjectPool.ObjectFactory(java.lang.Class cls,
java.lang.Object[] params,
Setup ps)
Setup object.
The construction parameter types are deduced from the types of the passed parameter objects, and a compatible constructor is searched for.
cls - the class of the object to buildparams - the construction parameters to use, or nullps - the Setup object to be used for post-construction setup, or null
public ObjectPool.ObjectFactory(java.lang.String clsName,
java.lang.Object[] params,
Setup ps)
Setup object.
The construction parameter types are deduced from the types of the passed parameter objects, and a compatible constructor is searched for.
clsName - the name of class of the object to buildparams - the construction parameters to use, or nullps - the Setup object to be used for post-construction setup, or null| Method Detail |
public java.lang.Object create()
Setup object defined at construction for construction
and post-construction initialization.
create in interface ObjectPool.Factorycreate in class ObjectPool.BaseFactoryObjectPoolException - if there is a problem creating the objectpublic void destroy(java.lang.Object obj)
destroy in interface ObjectPool.Factorydestroy in class ObjectPool.BaseFactory
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||