|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.jms.adapter.jca.ActivationProcessor
public class ActivationProcessor
Passes objects to endpoints to be processed in worker threads. If endpoint is instance of MessageListener and object is instance of message then message is passed to the listener. If endpoint is instance of Processor then object is passed to the processor. Otherwise, if object is instance of Invocation then the invocation is executed against the endpoint. If none of this is true then message is discarded and a warning is logged. In the case of invocation, if the target method returns value and there are multiple endpoints listening then there are two options - a) return value from one of registered endpoints is returned (default) b) all values are assembled into a collection and returned. This behavior is controlled by "collectAllResults" parameter. The same is true if endpoints provide processor instances. Nulls are not collected and not sent back. Empty results collection is not sent back either.
Constructor Summary | |
---|---|
ActivationProcessor()
|
Method Summary | |
---|---|
void |
configure(java.util.Set activations,
javax.resource.spi.work.WorkManager workManager)
|
long |
getTimeout()
|
boolean |
isCollectAllResults()
|
java.lang.Object |
process(java.lang.Object obj)
Collects non-null returns from registered endpoints and returns them as collection Returns null if collection is empty. |
void |
setCollectAllResults(boolean collectAllReturns)
If set to true then value returned from process is a collection of all return |
void |
setTimeout(long timeout)
Timeout for collection of results from all work items. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ActivationProcessor()
Method Detail |
---|
public void configure(java.util.Set activations, javax.resource.spi.work.WorkManager workManager)
public void setTimeout(long timeout)
timeout
- public long getTimeout()
public void setCollectAllResults(boolean collectAllReturns)
collectAllReturns
- public boolean isCollectAllResults()
public java.lang.Object process(java.lang.Object obj) throws java.lang.Exception
process
in interface Processor
java.lang.Exception
- If exception is thrown it is also
serialized and sent as error reply.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |