|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Factories implementing this interface are used by object pool implementations for instantiating the objects.
Rarely you need to implement this interface directly, usually
you extend PooledObjectFactoryAdapter class.
AdaptiveObjectPool,
PooledObjectFactoryAdapter| Method Summary | |
java.lang.Object |
createObject()
Instantiates an object for a pool. |
void |
destroyObject(java.lang.Object o)
Destroyes the object before it is removed from the pool. |
void |
resetObject(java.lang.Object o)
Resets an object after it had been used. |
void |
setPool(AdaptiveObjectPool pool)
This method is called when the factory instance is used when creating a new pool. |
| Method Detail |
public java.lang.Object createObject()
public void resetObject(java.lang.Object o)
Note, this method is called from a synchronized block, so it should be short.
o - the object being returned to the pool after use.public void destroyObject(java.lang.Object o)
Note, this method is called from a synchronized block, so it should be short.
o - the object being removed from the pool.public void setPool(AdaptiveObjectPool pool)
AdaptiveObjectPool contructor
calls the method.
pool - reference to the pool instance, which is going to
use this factory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||