public class Pipeline extends MulticastProcessor implements AsyncProcessor, Traceable
onPrepare
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
Constructor and Description |
---|
Pipeline(CamelContext camelContext,
Collection<Processor> processors) |
Modifier and Type | Method and Description |
---|---|
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(CamelContext camelContext,
List<Processor> processors) |
void |
process(Exchange exchange)
Processes the message exchange
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange.
|
String |
toString() |
createAggregateExecutorService, createErrorHandler, createProcessorExchangePair, createProcessorExchangePairs, createUnitOfWorkProcessor, doAggregate, doAggregateInternal, doDone, doProcessParallel, doProcessSequential, doShutdown, doStart, doStop, getAggregationStrategy, getAggregationStrategy, getCamelContext, getExchangeIndex, getProcessors, getTimeout, hasNext, isParallelProcessing, isShareUnitOfWork, isStopOnException, isStreaming, next, prepareSharedUnitOfWork, removeAggregationStrategyFromExchange, setAggregationStrategyOnExchange, setToEndpoint, updateNewExchange
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public Pipeline(CamelContext camelContext, Collection<Processor> processors)
public static Processor newInstance(CamelContext camelContext, List<Processor> processors)
public void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
process
in class MulticastProcessor
exchange
- the message exchangeException
- if an internal processing error has occurred.public boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception
would be set on the Exchange
.process
in interface AsyncProcessor
process
in class MulticastProcessor
exchange
- the message exchangecallback
- the AsyncCallback
will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.protected Exchange createNextExchange(Exchange previousExchange)
previousExchange
- the previous exchangeprotected boolean continueRouting(Iterator<Processor> it, Exchange exchange)
public String toString()
toString
in class MulticastProcessor
public String getTraceLabel()
Traceable
getTraceLabel
in interface Traceable
getTraceLabel
in class MulticastProcessor
Apache Camel