Package org.apache.camel.spi
Interface ProducerCache.AsyncProducerCallback
- Enclosing interface:
ProducerCache
public static interface ProducerCache.AsyncProducerCallback
Callback for sending a exchange message to a endpoint using an
AsyncProcessor
capable producer.
Using this callback as a template pattern ensures that Camel handles the resource handling and will start and
stop the given producer, to avoid resource leaks.-
Method Summary
Modifier and TypeMethodDescriptionboolean
doInAsyncProducer
(AsyncProducer asyncProducer, Exchange exchange, AsyncCallback callback) Performs operation on the given producer to send the given exchange.
-
Method Details
-
doInAsyncProducer
Performs operation on the given producer to send the given exchange.- Parameters:
asyncProducer
- the async producer, is never nullexchange
- the exchange to processcallback
- the async callback- Returns:
- (doneSync) true to continue execute synchronously, false to continue being executed asynchronously
-