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:

Method Summary
 boolean doInAsyncProducer(Producer producer, AsyncProcessor asyncProducer, Exchange exchange, ExchangePattern exchangePattern, AsyncCallback callback)
          Performs operation on the given producer to send the given exchange.
 

Method Detail

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 null
asyncProducer - the async producer, is newer null
exchange - the exchange, can be null if so then create a new exchange from the producer
exchangePattern - the exchange pattern, can be null
callback - the async callback
Returns:
(doneSync) true to continue execute synchronously, false to continue being executed asynchronously


Apache CAMEL