Package org.apache.camel
Interface AsyncCallback
- All Superinterfaces:
Runnable
The callback interface for an
AsyncProcessor
so that it can notify you when an Exchange
is done.
For example a AsyncProcessor
should invoke the done method when the Exchange
is ready to be continued
routed. This allows to implement asynchronous Producer
which can continue routing Exchange
when all
the data has been gathered. This allows to build non blocking request/reply communication.-
Method Summary
-
Method Details
-
done
void done(boolean doneSync) This method is invoked once theExchange
is done. If an exception occurred while processing the exchange, the exception field of theExchange
being processed will hold the caused exception.- Parameters:
doneSync
- is true if the processing of theExchange
was completed by a synchronous thread. Otherwise its false to indicate it was completed by an asynchronous thread.
-
run
default void run()Optimized for the reactive executor engine to be able to schedule this callback in its engine.
-