org.apache.camel.processor
Class MulticastProcessor

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by 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: 36865 $
See Also:
Pipeline

Constructor Summary
MulticastProcessor(Collection<Processor> processors)
           
MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy)
           
MulticastProcessor(Collection<Processor> processors, AggregationStrategy aggregationStrategy, boolean parallelProcessing, ThreadPoolExecutor executor)
           
 
Method Summary
protected  List<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> createProcessorExchangePairs(Exchange exchange)
           
protected  void doStart()
           
protected  void doStop()
           
 AggregationStrategy getAggregationStrategy()
           
 Collection<Processor> getProcessors()
          Returns the producers to multicast to
 void process(Exchange exchange)
          Processes the message exchange
static
<E extends Exchange>
Collection<Processor>
toProducers(Collection<Endpoint> endpoints)
          A helper method to convert a list of endpoints into a list of processors
 String toString()
           
protected  void updateNewExchange(Exchange exchange, int i, List<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> allPairs)
           
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getThreadName, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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,
                                 List<org.apache.camel.processor.MulticastProcessor.ProcessorExchangePair> allPairs)

createProcessorExchangePairs

protected List<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.