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.MulticastProcessor.MulticastState
onPrepare
Constructor and Description |
---|
RecipientListProcessor(org.apache.camel.CamelContext camelContext,
org.apache.camel.spi.ProducerCache producerCache,
Iterator<?> iter) |
RecipientListProcessor(org.apache.camel.CamelContext camelContext,
org.apache.camel.spi.ProducerCache producerCache,
Iterator<?> iter,
org.apache.camel.AggregationStrategy aggregationStrategy) |
RecipientListProcessor(org.apache.camel.CamelContext camelContext,
org.apache.camel.spi.ProducerCache producerCache,
Iterator<?> iter,
org.apache.camel.AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean shutdownExecutorService,
boolean streaming,
boolean stopOnException,
long timeout,
org.apache.camel.Processor onPrepare,
boolean shareUnitOfWork,
boolean parallelAggregate) |
RecipientListProcessor(org.apache.camel.CamelContext camelContext,
org.apache.camel.spi.ProducerCache producerCache,
Iterator<?> iter,
org.apache.camel.AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean shutdownExecutorService,
boolean streaming,
boolean stopOnException,
long timeout,
org.apache.camel.Processor onPrepare,
boolean shareUnitOfWork,
boolean parallelAggregate,
boolean stopOnAggregateException) |
Modifier and Type | Method and Description |
---|---|
protected ProcessorExchangePair |
createProcessorExchangePair(int index,
org.apache.camel.Endpoint endpoint,
org.apache.camel.Producer producer,
org.apache.camel.Exchange exchange,
org.apache.camel.ExchangePattern pattern)
This logic is similar to MulticastProcessor but we have to return a RecipientProcessorExchangePair instead
|
protected Iterable<ProcessorExchangePair> |
createProcessorExchangePairs(org.apache.camel.Exchange exchange) |
protected void |
doShutdown() |
protected void |
doStart() |
protected void |
doStop() |
String |
getTraceLabel() |
boolean |
isIgnoreInvalidEndpoints() |
protected static org.apache.camel.Endpoint |
resolveEndpoint(org.apache.camel.Exchange exchange,
Object recipient) |
protected org.apache.camel.ExchangePattern |
resolveExchangePattern(Object recipient) |
void |
setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints) |
String |
toString() |
afterSend, beforeSend, createAggregateExecutorService, createErrorHandler, createProcessorExchangePair, createUnitOfWorkProcessor, doAggregate, doDone, getAggregationStrategy, getAggregationStrategy, getCamelContext, getExchangeIndex, getId, getProcessors, getTimeout, hasNext, isParallelAggregate, isParallelProcessing, isShareUnitOfWork, isStopOnAggregateException, isStopOnException, isStreaming, next, prepareSharedUnitOfWork, process, removeAggregationStrategyFromExchange, schedule, schedule, setAggregationStrategyOnExchange, setId, setToEndpoint, updateNewExchange
build, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public RecipientListProcessor(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.ProducerCache producerCache, Iterator<?> iter)
public RecipientListProcessor(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.ProducerCache producerCache, Iterator<?> iter, org.apache.camel.AggregationStrategy aggregationStrategy)
public RecipientListProcessor(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.ProducerCache producerCache, Iterator<?> iter, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean shareUnitOfWork, boolean parallelAggregate)
public RecipientListProcessor(org.apache.camel.CamelContext camelContext, org.apache.camel.spi.ProducerCache producerCache, Iterator<?> iter, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean shareUnitOfWork, boolean parallelAggregate, boolean stopOnAggregateException)
public boolean isIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(boolean ignoreInvalidEndpoints)
protected Iterable<ProcessorExchangePair> createProcessorExchangePairs(org.apache.camel.Exchange exchange) throws Exception
createProcessorExchangePairs
in class MulticastProcessor
Exception
protected ProcessorExchangePair createProcessorExchangePair(int index, org.apache.camel.Endpoint endpoint, org.apache.camel.Producer producer, org.apache.camel.Exchange exchange, org.apache.camel.ExchangePattern pattern)
protected static org.apache.camel.Endpoint resolveEndpoint(org.apache.camel.Exchange exchange, Object recipient)
protected org.apache.camel.ExchangePattern resolveExchangePattern(Object recipient) throws UnsupportedEncodingException, URISyntaxException, MalformedURLException
protected void doStart() throws Exception
doStart
in class MulticastProcessor
Exception
protected void doStop() throws Exception
doStop
in class MulticastProcessor
Exception
protected void doShutdown() throws Exception
doShutdown
in class MulticastProcessor
Exception
public String toString()
toString
in class MulticastProcessor
public String getTraceLabel()
getTraceLabel
in interface org.apache.camel.Traceable
getTraceLabel
in class MulticastProcessor
Apache Camel