public class RecipientListProcessor extends MulticastProcessor
MulticastProcessor which is based
on recipient lists. This implementation have to handle the fact the processors is not known at design time
but evaluated at runtime from the dynamic recipient list. Therefore this implementation have to at runtime
lookup endpoints and create producers which should act as the processors for the multicast processors which
runs under the hood. Also this implementation supports the asynchronous routing engine which makes the code
more trickier.onPrepareshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
RecipientListProcessor(CamelContext camelContext,
ProducerCache producerCache,
Iterator<Object> iter) |
RecipientListProcessor(CamelContext camelContext,
ProducerCache producerCache,
Iterator<Object> iter,
AggregationStrategy aggregationStrategy) |
RecipientListProcessor(CamelContext camelContext,
ProducerCache producerCache,
Iterator<Object> iter,
AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean shutdownExecutorService,
boolean streaming,
boolean stopOnException,
long timeout,
Processor onPrepare,
boolean shareUnitOfWork)
Deprecated.
|
RecipientListProcessor(CamelContext camelContext,
ProducerCache producerCache,
Iterator<Object> iter,
AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean shutdownExecutorService,
boolean streaming,
boolean stopOnException,
long timeout,
Processor onPrepare,
boolean shareUnitOfWork,
boolean parallelAggregate) |
RecipientListProcessor(CamelContext camelContext,
ProducerCache producerCache,
Iterator<Object> iter,
AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean shutdownExecutorService,
boolean streaming,
boolean stopOnException,
long timeout,
Processor onPrepare,
boolean shareUnitOfWork,
boolean parallelAggregate,
boolean stopOnAggregateException) |
| Modifier and Type | Method and Description |
|---|---|
protected ProcessorExchangePair |
createProcessorExchangePair(int index,
Endpoint endpoint,
Producer producer,
Exchange exchange,
ExchangePattern pattern)
This logic is similar to MulticastProcessor but we have to return a RecipientProcessorExchangePair instead
|
protected Iterable<ProcessorExchangePair> |
createProcessorExchangePairs(Exchange exchange) |
protected void |
doShutdown()
Implementations override this method to perform customized shutdown.
|
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
String |
getTraceLabel()
Gets the trace label used for logging when tracing is enabled.
|
boolean |
isIgnoreInvalidEndpoints() |
protected static Endpoint |
resolveEndpoint(Exchange exchange,
Object recipient) |
protected ExchangePattern |
resolveExchangePattern(Object recipient) |
void |
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints) |
String |
toString() |
createAggregateExecutorService, createErrorHandler, createProcessorExchangePair, createUnitOfWorkProcessor, doAggregate, doAggregateInternal, doDone, doProcessParallel, doProcessSequential, getAggregationStrategy, getAggregationStrategy, getCamelContext, getExchangeIndex, getId, getProcessors, getTimeout, hasNext, isParallelAggregate, isParallelProcessing, isShareUnitOfWork, isStopOnAggregateException, isStopOnException, isStreaming, next, prepareSharedUnitOfWork, process, process, removeAggregationStrategyFromExchange, setAggregationStrategyOnExchange, setId, setToEndpoint, updateNewExchangedoResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic RecipientListProcessor(CamelContext camelContext, ProducerCache producerCache, Iterator<Object> iter)
public RecipientListProcessor(CamelContext camelContext, ProducerCache producerCache, Iterator<Object> iter, AggregationStrategy aggregationStrategy)
@Deprecated public RecipientListProcessor(CamelContext camelContext, ProducerCache producerCache, Iterator<Object> iter, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, Processor onPrepare, boolean shareUnitOfWork)
public RecipientListProcessor(CamelContext camelContext, ProducerCache producerCache, Iterator<Object> iter, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, Processor onPrepare, boolean shareUnitOfWork, boolean parallelAggregate)
public RecipientListProcessor(CamelContext camelContext, ProducerCache producerCache, Iterator<Object> iter, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, Processor onPrepare, boolean shareUnitOfWork, boolean parallelAggregate, boolean stopOnAggregateException)
public boolean isIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
protected Iterable<ProcessorExchangePair> createProcessorExchangePairs(Exchange exchange) throws Exception
createProcessorExchangePairs in class MulticastProcessorExceptionprotected ProcessorExchangePair createProcessorExchangePair(int index, Endpoint endpoint, Producer producer, Exchange exchange, ExchangePattern pattern)
protected static Endpoint resolveEndpoint(Exchange exchange, Object recipient)
protected ExchangePattern resolveExchangePattern(Object recipient) throws UnsupportedEncodingException, URISyntaxException, MalformedURLException
protected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class MulticastProcessorExceptionServiceSupport.doStop()protected void doStop() throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.doStop in class MulticastProcessorExceptionServiceSupport.doStart()protected void doShutdown() throws Exception
ServiceSupportdoShutdown in class MulticastProcessorExceptionpublic String toString()
toString in class MulticastProcessorpublic String getTraceLabel()
TraceablegetTraceLabel in interface TraceablegetTraceLabel in class MulticastProcessorApache Camel