|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sadun.util.pool2.ObjectPool.PooledObjectFactory
A object factory
which produces BasePooledObject
wrappers for other classes.
In detail, this class uses an existing
object factory
to produce objects of class C, obtains an appropriate PooledC subclass of
BasePooledObject
and then wraps the objects in instances of PooledC.
Constructor Summary | |
protected |
ObjectPool.PooledObjectFactory(ObjectPool pool,
ObjectPool.Factory factory)
Create a factory which is used by the given ObjectPool and employs the given
org.sadun.util.pool.ObjectPool.Factory |
Method Summary | |
java.lang.Object |
create()
This method is invoked by the pool when a pooled instance has to be created. |
void |
destroy(java.lang.Object obj)
This method is invoked by the pool when a pooled instance has to be destroyed. |
java.lang.Class |
getProducedClass()
This method is invoked when validating the created class. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ObjectPool.PooledObjectFactory(ObjectPool pool, ObjectPool.Factory factory) throws ObjectPool.ObjectPoolException
ObjectPool
and employs the given
org.sadun.util.pool.ObjectPool.Factory
pool
- the ObjectPool
using this factory to create pooled objectsfactory
- the org.sadun.util.pool.ObjectPool.Factory
to produce
the original instancesMethod Detail |
public java.lang.Object create() throws ObjectPool.ObjectPoolException
ObjectPool.Factory
create
in interface ObjectPool.Factory
ObjectPool.ObjectPoolException
ObjectPool.Factory.create()
public java.lang.Class getProducedClass()
ObjectPool.Factory
getProducedClass
in interface ObjectPool.Factory
ObjectPool.Factory.getProducedClass()
public void destroy(java.lang.Object obj) throws ObjectPool.ObjectPoolException
ObjectPool.Factory
destroy
in interface ObjectPool.Factory
obj
- the object to destroy
ObjectPool.ObjectPoolException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |