|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.processor.InterceptorToAsyncProcessorBridge
public class InterceptorToAsyncProcessorBridge
A bridge to have regular interceptors implemented as Processor
work with the asynchronous routing engine without causing side effects.
| Constructor Summary | |
|---|---|
InterceptorToAsyncProcessorBridge(Processor interceptor)
Constructs the bridge |
|
InterceptorToAsyncProcessorBridge(Processor interceptor,
AsyncProcessor target)
Constructs the bridge |
|
| Method Summary | |
|---|---|
protected void |
doStart()
|
protected void |
doStop()
|
void |
process(Exchange exchange)
Process invoked by the interceptor |
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange. |
void |
setTarget(Processor target)
|
String |
toString()
|
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public InterceptorToAsyncProcessorBridge(Processor interceptor)
interceptor - the interceptor to bridge
public InterceptorToAsyncProcessorBridge(Processor interceptor,
AsyncProcessor target)
interceptor - the interceptor to bridgetarget - the target| Method Detail |
|---|
public void process(Exchange exchange)
throws Exception
process in interface Processorexchange - the message exchange
Exception
public boolean process(Exchange exchange,
AsyncCallback callback)
AsyncProcessorProcessor.process(org.apache.camel.Exchange), but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception would be set on the Exchange.
process in interface AsyncProcessorexchange - the message exchangecallback - the AsyncCallback will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.
AsyncProcessorHelper.process(AsyncProcessor, Exchange, AsyncCallback)public void setTarget(Processor target)
public String toString()
toString in class Object
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||