|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(Class<?> svcClass,
int max)
Pool of instances of the svcClass |
|
PooledFactory(Collection<Object> objs)
Pool constructed from the give Collection of objects. |
|
PooledFactory(Factory factory,
int max)
Pool of instances constructed from the given factory |
|
PooledFactory(Factory factory,
int max,
boolean createMore)
Pool of instances constructed from the given factory |
Method Summary | |
---|---|
Object |
create(Exchange ex)
Creates the object that will be used for the invoke |
protected Object |
createObject(Exchange e)
|
void |
release(Exchange ex,
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(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(Collection<Object> objs)
objs
- The collection of objects to pre-populate the poolMethod Detail |
---|
public Object create(Exchange ex) throws Throwable
create
in interface Factory
Throwable
protected Object createObject(Exchange e) throws Throwable
Throwable
public void release(Exchange ex, Object o)
release
in interface Factory
o
- object created from the create method
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |