org.apache.camel.processor
Class MulticastProcessor
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.processor.MulticastProcessor
- All Implemented Interfaces:
- Processor, Service
- Direct Known Subclasses:
- Pipeline, Splitter
public class MulticastProcessor
- extends ServiceSupport
- implements Processor
Implements the Multicast pattern to send a message exchange to a number of
endpoints, each endpoint receiving a copy of the message exchange.
- Version:
- $Revision: 51106 $
- See Also:
Pipeline
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
MulticastProcessor
public MulticastProcessor(Collection<Processor> processors)
MulticastProcessor
public MulticastProcessor(Collection<Processor> processors,
AggregationStrategy aggregationStrategy)
MulticastProcessor
public MulticastProcessor(Collection<Processor> processors,
AggregationStrategy aggregationStrategy,
boolean parallelProcessing,
ThreadPoolExecutor executor)
toProducers
public static <E extends Exchange> Collection<Processor> toProducers(Collection<Endpoint> endpoints)
throws Exception
- A helper method to convert a list of endpoints into a list of processors
- Throws:
Exception
toString
public String toString()
- Overrides:
toString
in class Object
process
public void process(Exchange exchange)
throws Exception
- Description copied from interface:
Processor
- Processes the message exchange
- Specified by:
process
in interface Processor
- Throws:
Exception
- if an internal processing error has occurred.
updateNewExchange
protected void updateNewExchange(Exchange exchange,
int i,
Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> allPairs)
createProcessorExchangePairs
protected Iterable<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> createProcessorExchangePairs(Exchange exchange)
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class ServiceSupport
- Throws:
Exception
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class ServiceSupport
- Throws:
Exception
getProcessors
public Collection<Processor> getProcessors()
- Returns the producers to multicast to
getAggregationStrategy
public AggregationStrategy getAggregationStrategy()
Copyright © 2008 IONA Open Source Community. All Rights Reserved.