org.apache.camel
Interface AsyncProcessor

All Superinterfaces:
Processor
All Known Subinterfaces:
LoadBalancer
All Known Implementing Classes:
CollectionProducer, DeadLetterChannel, DelegateAsyncProcessor, DirectProducer, ExchangePatternProcessor, HandleFaultProcessor, InstrumentationProcessor, LoadBalancerSupport, LoadBalancerType, Pipeline, QueueLoadBalancer, RandomLoadBalancer, RandomLoadBalanceStrategy, RoundRobinLoadBalancer, RoundRobinLoadBalanceStrategy, SendProcessor, StickyLoadBalancer, StickyLoadBalanceStrategy, StreamCachingInterceptor, ThreadProcessor, TopicLoadBalancer, TopicLoadBalanceStrategy, UnitOfWorkProcessor

public interface AsyncProcessor
extends Processor

A more complex version of Processor which supports asynchronous processing of the Exchange. Any processor can be coerced to have an AsyncProcessor interface by using the AsyncProcessorTypeConverter.covert method.

Version:
$Revision: 642753 $

Method Summary
 boolean process(Exchange exchange, AsyncCallback callback)
          Processes the message exchange.
 
Methods inherited from interface org.apache.camel.Processor
process
 

Method Detail

process

boolean process(Exchange exchange,
                AsyncCallback callback)
Processes the message exchange. Similar to Processor.process(org.apache.camel.Exchange), but the caller supports having the exchange asynchronously processed.

Parameters:
exchange - the Exchange to process
callback - the AsyncCallback will be invoked when the processing of the exchange is completed. If the exchange is completed synchronously, then the callback is also invoked synchronously. The callback should therefore be careful of starting recursive loop.
Returns:
true if the processing was completed synchronously.


Apache CAMEL