org.apache.camel.processor
Class Pipeline

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.MulticastProcessor
          extended by org.apache.camel.processor.Pipeline
All Implemented Interfaces:
Navigate, Processor, Traceable, Service

public class Pipeline
extends MulticastProcessor
implements Processor, Traceable

Creates a Pipeline pattern where the output of the previous step is sent as input to the next step, reusing the same message exchanges

Version:
$Revision: 793373 $

Constructor Summary
Pipeline(Collection<Processor> processors)
           
 
Method Summary
protected  boolean continueRouting(Iterator<Processor> it, Exchange exchange)
           
protected  Exchange createNextExchange(Exchange previousExchange)
          Strategy method to create the next exchange from the previous exchange.
 String getTraceLabel()
          Gets the trace label used for logging when tracing is enabled.
static Processor newInstance(List<Processor> processors)
           
 void process(Exchange exchange)
          Processes the message exchange
 String toString()
           
 
Methods inherited from class org.apache.camel.processor.MulticastProcessor
createProcessorExchangePairs, doAggregate, doProcessParallel, doProcessSequntiel, doStart, doStop, getAggregationStrategy, getExecutorService, getProcessors, hasNext, isParallelProcessing, isStreaming, next, setExecutorService, updateNewExchange
 
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

Pipeline

public Pipeline(Collection<Processor> processors)
Method Detail

newInstance

public static Processor newInstance(List<Processor> processors)

process

public void process(Exchange exchange)
             throws Exception
Description copied from interface: Processor
Processes the message exchange

Specified by:
process in interface Processor
Overrides:
process in class MulticastProcessor
Parameters:
exchange - the message exchange
Throws:
Exception - if an internal processing error has occurred.

createNextExchange

protected Exchange createNextExchange(Exchange previousExchange)
Strategy method to create the next exchange from the previous exchange.

Remember to copy the original exchange id otherwise correlation of ids in the log is a problem

Parameters:
previousExchange - the previous exchange
Returns:
a new exchange

continueRouting

protected boolean continueRouting(Iterator<Processor> it,
                                  Exchange exchange)

toString

public String toString()
Overrides:
toString in class MulticastProcessor

getTraceLabel

public String getTraceLabel()
Description copied from interface: Traceable
Gets the trace label used for logging when tracing is enabled.

The lable should be short and precise.

Specified by:
getTraceLabel in interface Traceable
Overrides:
getTraceLabel in class MulticastProcessor
Returns:
the label


Apache CAMEL