|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ebmwebsourcing.easycommons.xml.TransformerResourcePool
public class TransformerResourcePool
This class represent a Transformer pool, which provided Transformer
object as resource.
| Constructor Summary | |
|---|---|
TransformerResourcePool(int minPoolSize,
int maxPoolSize,
PoolPolicy poolPolicy)
Allowing to instantiate a new TransformerResourcePool containing Transformer resources. |
|
| Method Summary | |
|---|---|
void |
release(javax.xml.transform.Transformer transformer)
Release the specified Transformer After putting back the
Transformer in the pool, the method onRelease() of the
Transformer resource handler is called. |
javax.xml.transform.Transformer |
take()
Take one unused Transformer in the current pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransformerResourcePool(int minPoolSize,
int maxPoolSize,
PoolPolicy poolPolicy)
TransformerResourcePool containing Transformer resources.
minPoolSize - The minimum number of Transformer instances in the pool (created at the
initialization).maxPoolSize - the maximum number of Transformer instances in the current pool (limit of the
pool). It must be greater or equals to the specified minSize.
The maximum value is Integer.MAX_VALUEpoolPolicy - the PoolPolicy to adopt when the maximum size is reached. it
must not be null.| Method Detail |
|---|
public javax.xml.transform.Transformer take()
Transformer in the current pool. After getting a
Transformer from the pool and before returning a
Transformer, the method onTake() of the Transformer
resource handler is called.
Transformer
PoolException - if the current thread is interrupted for the pool policy WAIT
or if there is no more available resource in the pool for the
pool policy REJECTpublic final void release(javax.xml.transform.Transformer transformer)
Transformer After putting back the
Transformer in the pool, the method onRelease() of the
Transformer resource handler is called.
transformer - The Transformer to release
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||