Package org.apache.camel.processor
Class Splitter
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.AsyncProcessorSupport
org.apache.camel.processor.MulticastProcessor
org.apache.camel.processor.Splitter
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.AsyncProcessor
,org.apache.camel.Navigate<org.apache.camel.Processor>
,org.apache.camel.Processor
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.ErrorHandlerAware
,org.apache.camel.spi.HasId
,org.apache.camel.spi.IdAware
,org.apache.camel.spi.RouteIdAware
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
,org.apache.camel.Traceable
public class Splitter
extends MulticastProcessor
implements org.apache.camel.AsyncProcessor, org.apache.camel.Traceable
Implements a dynamic Splitter pattern where an expression is
evaluated to iterate through each of the parts of a message and then each part is then send to some endpoint.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.camel.processor.MulticastProcessor
MulticastProcessor.MulticastReactiveTask, MulticastProcessor.MulticastTask, MulticastProcessor.MulticastTransactedTask
-
Field Summary
Fields inherited from class org.apache.camel.processor.MulticastProcessor
onPrepare, processorExchangeFactory
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
ConstructorDescriptionSplitter
(org.apache.camel.CamelContext camelContext, org.apache.camel.Route route, org.apache.camel.Expression expression, org.apache.camel.Processor destination, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean useSubUnitOfWork, boolean parallelAggregate) Splitter
(org.apache.camel.CamelContext camelContext, org.apache.camel.Route route, org.apache.camel.Expression expression, org.apache.camel.Processor destination, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean useSubUnitOfWork, boolean parallelAggregate, String delimiter) -
Method Summary
Modifier and TypeMethodDescriptionprotected Iterable
<ProcessorExchangePair> createProcessorExchangePairs
(org.apache.camel.Exchange exchange) protected void
doBuild()
protected void
doInit()
protected Integer
getExchangeIndex
(org.apache.camel.Exchange exchange) org.apache.camel.Expression
boolean
process
(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) protected void
updateNewExchange
(org.apache.camel.Exchange exchange, int index, Iterable<ProcessorExchangePair> allPairs, boolean hasNext) Methods inherited from class org.apache.camel.processor.MulticastProcessor
afterSend, beforeSend, createAggregateExecutorService, createProcessorExchangePair, createUnitOfWorkProcessor, doAggregate, doDone, doProcess, doShutdown, doStart, doStop, getAggregateExecutorService, getAggregationStrategy, getAggregationStrategy, getCamelContext, getErrorHandler, getId, getProcessors, getRouteId, getTimeout, hasNext, isParallelAggregate, isParallelProcessing, isShareUnitOfWork, isStopOnException, isStreaming, isSynchronous, next, prepareSharedUnitOfWork, removeAggregationStrategyFromExchange, schedule, schedule, setAggregateExecutorService, setAggregationStrategyOnExchange, setErrorHandler, setId, setRouteId, setSynchronous, setToEndpoint, toString, wrapInErrorHandler
Methods inherited from class org.apache.camel.support.AsyncProcessorSupport
process, processAsync
Methods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.AsyncProcessor
processAsync
Methods inherited from interface org.apache.camel.spi.IdAware
setGeneratedId
Methods inherited from interface org.apache.camel.Processor
process
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
Splitter
public Splitter(org.apache.camel.CamelContext camelContext, org.apache.camel.Route route, org.apache.camel.Expression expression, org.apache.camel.Processor destination, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean useSubUnitOfWork, boolean parallelAggregate) -
Splitter
public Splitter(org.apache.camel.CamelContext camelContext, org.apache.camel.Route route, org.apache.camel.Expression expression, org.apache.camel.Processor destination, org.apache.camel.AggregationStrategy aggregationStrategy, boolean parallelProcessing, ExecutorService executorService, boolean shutdownExecutorService, boolean streaming, boolean stopOnException, long timeout, org.apache.camel.Processor onPrepare, boolean useSubUnitOfWork, boolean parallelAggregate, String delimiter)
-
-
Method Details
-
getTraceLabel
- Specified by:
getTraceLabel
in interfaceorg.apache.camel.Traceable
- Overrides:
getTraceLabel
in classMulticastProcessor
-
doBuild
- Overrides:
doBuild
in classMulticastProcessor
- Throws:
Exception
-
doInit
- Overrides:
doInit
in classMulticastProcessor
- Throws:
Exception
-
process
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) - Specified by:
process
in interfaceorg.apache.camel.AsyncProcessor
- Overrides:
process
in classMulticastProcessor
-
createProcessorExchangePairs
protected Iterable<ProcessorExchangePair> createProcessorExchangePairs(org.apache.camel.Exchange exchange) throws Exception - Overrides:
createProcessorExchangePairs
in classMulticastProcessor
- Throws:
Exception
-
updateNewExchange
protected void updateNewExchange(org.apache.camel.Exchange exchange, int index, Iterable<ProcessorExchangePair> allPairs, boolean hasNext) - Overrides:
updateNewExchange
in classMulticastProcessor
-
getExchangeIndex
- Overrides:
getExchangeIndex
in classMulticastProcessor
-
getExpression
public org.apache.camel.Expression getExpression()
-