org.apache.camel.processor
Class PipelineHelper

java.lang.Object
  extended by org.apache.camel.processor.PipelineHelper

public final class PipelineHelper
extends Object

Helper for processing Exchange in a pipeline.

Version:

Method Summary
static boolean continueProcessing(Exchange exchange, String message, org.slf4j.Logger log)
          Should we continue processing the exchange?
static Exchange createNextExchange(Exchange previousExchange)
          Strategy method to create the next exchange from the previous exchange.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

continueProcessing

public static boolean continueProcessing(Exchange exchange,
                                         String message,
                                         org.slf4j.Logger log)
Should we continue processing the exchange?

Parameters:
exchange - the next exchange
message - a message to use when logging that we should not continue processing
log - a logger
Returns:
true to continue processing, false to break out, for example if an exception occurred.

createNextExchange

public static 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


Apache Camel