org.apache.camel.util
Class AsyncProcessorHelper

java.lang.Object
  extended by org.apache.camel.util.AsyncProcessorHelper

public final class AsyncProcessorHelper
extends Object

Helper methods for AsyncProcessor objects.


Method Summary
static void process(AsyncProcessor processor, Exchange exchange)
          Calls the async version of the processor's process method and waits for it to complete before returning.
static boolean process(AsyncProcessor processor, Exchange exchange, AsyncCallback callback)
          Calls the async version of the processor's process method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

process

public static boolean process(AsyncProcessor processor,
                              Exchange exchange,
                              AsyncCallback callback)
Calls the async version of the processor's process method.

This implementation supports transacted Exchanges which ensure those are run in a synchronous fashion. See more details at AsyncProcessor.

Parameters:
processor - the processor
exchange - the exchange
callback - the callback
Returns:
true to continue execute synchronously, false to continue being executed asynchronously

process

public static void process(AsyncProcessor processor,
                           Exchange exchange)
                    throws Exception
Calls the async version of the processor's process method and waits for it to complete before returning. This can be used by AsyncProcessor objects to implement their sync version of the process method.

Parameters:
processor - the processor
exchange - the exchange
Throws:
Exception - can be thrown if waiting is interrupted


Apache CAMEL