public interface AsyncProducerCallback
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.Modifier and Type | Method and Description |
---|---|
boolean |
doInAsyncProducer(Producer producer,
AsyncProcessor asyncProducer,
Exchange exchange,
ExchangePattern exchangePattern,
AsyncCallback callback)
Performs operation on the given producer to send the given exchange.
|
boolean doInAsyncProducer(Producer producer, AsyncProcessor asyncProducer, Exchange exchange, ExchangePattern exchangePattern, AsyncCallback callback)
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 callbackApache Camel