org.apache.camel
Interface AsyncProducerCallback
public interface 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.
- Version:
doInAsyncProducer
boolean doInAsyncProducer(Producer producer,
AsyncProcessor asyncProducer,
Exchange exchange,
ExchangePattern exchangePattern,
AsyncCallback callback)
- Performs operation on the given producer to send the given exchange.
- Parameters:
producer
- the producer, is newer nullasyncProducer
- the async producer, is newer nullexchange
- the exchange, can be null if so then create a new exchange from the producerexchangePattern
- the exchange pattern, can be nullcallback
- the async callback
- Returns:
- (doneSync) true to continue execute synchronously, false to continue being executed asynchronously
Apache CAMEL