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:
Processor, Service

public class Pipeline
extends MulticastProcessor
implements Processor

Creates a Pipeline pattern where the output of the previous step is sent as input to the next step when working with request/response message exchanges.

Version:
$Revision: 534145 $

Constructor Summary
Pipeline(Collection<Endpoint> endpoints)
           
 
Method Summary
protected  Exchange copyExchangeStrategy(Exchange exchange)
          Strategy method to copy the exchange before sending to another endpoint.
protected  Exchange createNextExchange(Producer producer, Exchange previousExchange)
          Strategy method to create the next exchange from the
 void process(Exchange exchange)
          Processes the message exchange
 String toString()
           
 
Methods inherited from class org.apache.camel.processor.MulticastProcessor
copyExchangeStrategy, doStart, doStop, getEndpoints, getProducers, toProducers
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
isStarted, isStopped, isStopping, 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<Endpoint> endpoints)
         throws Exception
Throws:
Exception
Method Detail

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
Throws:
Exception - if an internal processing error has occurred.

createNextExchange

protected Exchange createNextExchange(Producer producer,
                                      Exchange previousExchange)
Strategy method to create the next exchange from the

Parameters:
producer - the producer used to send to the endpoint
previousExchange - the previous exchange
Returns:
a new exchange

copyExchangeStrategy

protected Exchange copyExchangeStrategy(Exchange exchange)
Strategy method to copy the exchange before sending to another endpoint. Derived classes such as the Pipeline will not clone the exchange

Parameters:
exchange -
Returns:
the current exchange if no copying is required such as for a pipeline otherwise a new copy of the exchange is returned.

toString

public String toString()
Overrides:
toString in class MulticastProcessor


Copyright © 2007 Apache Software Foundation. All Rights Reserved.