org.apache.camel
Interface ProducerCallback<T>
public interface ProducerCallback<T>
Callback for sending a exchange message to a endpoint using a 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:
doInProducer
T doInProducer(Producer producer,
Exchange exchange,
ExchangePattern exchangePattern)
throws Exception
- Performs operation on the given producer to send the given exchange.
- Parameters:
producer
- the producer, is newer nullexchange
- the exchange, can be null if so then create a new exchange from the producerexchangePattern
- the exchange pattern, can be null
- Returns:
- the response
- Throws:
Exception
- if an internal processing error has occurred.
Apache CAMEL