|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.impl.ServiceSupport org.apache.camel.processor.MulticastProcessor
public class MulticastProcessor
Implements the Multicast pattern to send a message exchange to a number of endpoints, each endpoint receiving a copy of the message exchange.
Pipeline
Constructor Summary | |
---|---|
MulticastProcessor(Collection<Processor> processors)
|
|
MulticastProcessor(Collection<Processor> processors,
AggregationStrategy aggregationStrategy)
|
|
MulticastProcessor(Collection<Processor> processors,
AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ExecutorService executorService,
boolean streaming)
|
Method Summary | |
---|---|
protected Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> |
createProcessorExchangePairs(Exchange exchange)
|
protected void |
doAggregate(AtomicExchange result,
Exchange exchange)
Aggregate the Exchange with the current result |
protected void |
doProcessParallel(AtomicExchange result,
Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> pairs,
boolean streaming)
|
protected void |
doProcessSequntiel(AtomicExchange result,
Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> pairs)
|
protected void |
doStart()
|
protected void |
doStop()
|
AggregationStrategy |
getAggregationStrategy()
|
ExecutorService |
getExecutorService()
|
Collection<Processor> |
getProcessors()
Returns the producers to multicast to |
String |
getTraceLabel()
Gets the trace label used for logging when tracing is enabled. |
boolean |
hasNext()
Are there more outputs? |
boolean |
isParallelProcessing()
|
boolean |
isStreaming()
Is the multicast processor working in streaming mode? In streaming mode: we use Iterable to ensure we can send messages as soon as the data becomes available
for parallel processing, we start aggregating responses as they get send back to the processor;
this means the AggregationStrategy has to take care of handling out-of-order arrival of exchanges
|
List<Processor> |
next()
Next group of outputs |
void |
process(Exchange exchange)
Processes the message exchange |
void |
setExecutorService(ExecutorService executorService)
|
String |
toString()
|
protected void |
updateNewExchange(Exchange exchange,
int index,
Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> allPairs)
|
Methods inherited from class org.apache.camel.impl.ServiceSupport |
---|
addChildService, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MulticastProcessor(Collection<Processor> processors)
public MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy)
public MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean streaming)
Method Detail |
---|
public String toString()
toString
in class Object
public String getTraceLabel()
Traceable
getTraceLabel
in interface Traceable
public void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
exchange
- the message exchange
Exception
- if an internal processing error has occurred.protected void doProcessParallel(AtomicExchange result, Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> pairs, boolean streaming) throws InterruptedException, ExecutionException
InterruptedException
ExecutionException
protected void doProcessSequntiel(AtomicExchange result, Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> pairs) throws Exception
Exception
protected void doAggregate(AtomicExchange result, Exchange exchange)
Exchange
with the current result
result
- the current resultexchange
- the exchange to be added to the resultprotected void updateNewExchange(Exchange exchange, int index, Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> allPairs)
protected Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> createProcessorExchangePairs(Exchange exchange)
protected void doStop() throws Exception
doStop
in class ServiceSupport
Exception
protected void doStart() throws Exception
doStart
in class ServiceSupport
Exception
public boolean isStreaming()
Iterable
to ensure we can send messages as soon as the data becomes availableAggregationStrategy
has to take care of handling out-of-order arrival of exchanges
public Collection<Processor> getProcessors()
public AggregationStrategy getAggregationStrategy()
public boolean isParallelProcessing()
public ExecutorService getExecutorService()
public void setExecutorService(ExecutorService executorService)
public List<Processor> next()
Navigate
next
in interface Navigate
public boolean hasNext()
Navigate
hasNext
in interface Navigate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |