Package org.apache.camel
Interface AsyncCallback
-
- All Superinterfaces:
Runnable
public interface AsyncCallback extends Runnable
The callback interface for anAsyncProcessorso that it can notify you when anExchangeis done. For example aAsyncProcessorshould invoke the done method when theExchangeis ready to be continued routed. This allows to implement asynchronousProducerwhich can continue routingExchangewhen all the data has been gathered. This allows to build non blocking request/reply communication.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddone(boolean doneSync)This method is invoked once theExchangeis done.default voidrun()Optimized for the reactive executor engine to be able to schedule this callback in its engine.
-
-
-
Method Detail
-
done
void done(boolean doneSync)
This method is invoked once theExchangeis done. If an exception occurred while processing the exchange, the exception field of theExchangebeing processed will hold the caused exception.- Parameters:
doneSync- is true if the processing of theExchangewas completed by a synchronous thread. Otherwise its false to indicate it was completed by an asynchronous thread.
-
-