|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cxf.service.invoker.PooledFactory
public class PooledFactory
Factory the maintains a pool of instances that are used. Can optionally create more instances than the size of the queue
Constructor Summary | |
---|---|
PooledFactory(java.lang.Class svcClass,
int max)
Pool of instances of the svcClass |
|
PooledFactory(java.util.Collection<java.lang.Object> objs)
Pool constructed from the give Collection of objects. |
|
PooledFactory(Factory factory,
int max)
Pool of instances contructed from the given factory |
|
PooledFactory(Factory factory,
int max,
boolean createMore)
Pool of instances contructed from the given factory |
Method Summary | |
---|---|
java.lang.Object |
create(Exchange ex)
Creates the object that will be used for the invoke |
protected java.lang.Object |
createObject(Exchange e)
|
void |
release(Exchange ex,
java.lang.Object o)
Post invoke, this is called to allow the factory to release the object, store it, etc... |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PooledFactory(java.lang.Class svcClass, int max)
svcClass
- the class to createmax
- the absolute maximum number to create and poolpublic PooledFactory(Factory factory, int max)
factory
- max
- the absolute maximum number to create and poolpublic PooledFactory(Factory factory, int max, boolean createMore)
factory
- max
- the absolute maximum number to create and poolcreateMore
- If the pool is empty, but max objects have already
been constructed, should more be constructed on a per-request basis (and
then discarded when done) or should requests block until instances are
released back into the pool.public PooledFactory(java.util.Collection<java.lang.Object> objs)
objs
- The collection of objects to pre-polulate the poolMethod Detail |
---|
public java.lang.Object create(Exchange ex) throws java.lang.Throwable
create
in interface Factory
java.lang.Throwable
protected java.lang.Object createObject(Exchange e) throws java.lang.Throwable
java.lang.Throwable
public void release(Exchange ex, java.lang.Object o)
release
in interface Factory
o
- object created from the create method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |