|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jboss.minerva.pools.PoolObjectFactory
Creates objects to be used in an object pool. This is a class instead of an interface so you can ignore any of the methods you don't need.
Constructor Summary | |
PoolObjectFactory()
|
Method Summary | |
abstract java.lang.Object |
createObject()
Creates a new object to be stored in an object pool. |
void |
deleteObject(java.lang.Object pooledObject)
Permanently closes an object, after it is removed from the pool. |
java.lang.Object |
isUniqueRequest()
Decides whether a request for an object should be fulfilled by an object checked out of the pool previously, or a new object. |
void |
poolClosing(ObjectPool pool)
Indicates to the factory that the pool is closing down. |
void |
poolStarted(ObjectPool pool,
java.io.PrintWriter log)
Indicates to the factory that the pool has started up. |
java.lang.Object |
prepareObject(java.lang.Object pooledObject)
Prepares an object to be returned to the client. |
java.lang.Object |
returnObject(java.lang.Object clientObject)
Prepares an object to be returned to the pool. |
java.lang.Object |
translateObject(java.lang.Object clientObject)
If the objects supplied to the client are different than the objects in the pool, extracts a pool object from a client object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PoolObjectFactory()
Method Detail |
public abstract java.lang.Object createObject()
prepareObject(java.lang.Object)
public void poolStarted(ObjectPool pool, java.io.PrintWriter log)
pool
- The pool that is starting. You may decide to allow
multiple pools you use your factory, or to restrict it to a one-to-one
relationship.log
- A writer you can use to log messages. Use this in preference
to System.xxx.println.java.lang.IllegalArgumentException
- Occurs when the pool is null.public java.lang.Object prepareObject(java.lang.Object pooledObject)
pooledObject
- The object in the pool, as created by createObject.public java.lang.Object translateObject(java.lang.Object clientObject)
clientObject
- The client object, as returned by prepareObjectpublic java.lang.Object returnObject(java.lang.Object clientObject)
clientObject
- The client object, as returned by prepareObjectpublic void poolClosing(ObjectPool pool)
pool
- The pool that is closing. You may decide to allow
multiple pools you use your factory, or to restrict it to a one-to-one
relationship.java.lang.IllegalArgumentException
- Occurs when the pool is null.public void deleteObject(java.lang.Object pooledObject)
public java.lang.Object isUniqueRequest()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |