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, processorExchangeFactoryFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionSplitter(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 voiddoBuild()protected voiddoInit()protected IntegergetExchangeIndex(org.apache.camel.Exchange exchange) org.apache.camel.Expressionbooleanprocess(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) protected voidupdateNewExchange(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, getCacheSize, getCamelContext, getErrorHandler, getId, getProcessors, getRouteId, getTimeout, hasNext, isParallelAggregate, isParallelProcessing, isShareUnitOfWork, isStopOnException, isStreaming, isSynchronous, next, prepareSharedUnitOfWork, removeAggregationStrategyFromExchange, schedule, schedule, schedule, setAggregateExecutorService, setAggregationStrategyOnExchange, setErrorHandler, setId, setRouteId, setSynchronous, setToEndpoint, toString, wrapInErrorHandlerMethods inherited from class org.apache.camel.support.AsyncProcessorSupport
process, processAsyncMethods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.AsyncProcessor
processAsyncMethods inherited from interface org.apache.camel.spi.IdAware
setGeneratedIdMethods inherited from interface org.apache.camel.Processor
processMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods 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:
getTraceLabelin interfaceorg.apache.camel.Traceable- Overrides:
getTraceLabelin classMulticastProcessor
-
doBuild
- Overrides:
doBuildin classMulticastProcessor- Throws:
Exception
-
doInit
- Overrides:
doInitin classMulticastProcessor- Throws:
Exception
-
process
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback) - Specified by:
processin interfaceorg.apache.camel.AsyncProcessor- Overrides:
processin classMulticastProcessor
-
createProcessorExchangePairs
protected Iterable<ProcessorExchangePair> createProcessorExchangePairs(org.apache.camel.Exchange exchange) throws Exception - Overrides:
createProcessorExchangePairsin classMulticastProcessor- Throws:
Exception
-
updateNewExchange
protected void updateNewExchange(org.apache.camel.Exchange exchange, int index, Iterable<ProcessorExchangePair> allPairs, boolean hasNext) - Overrides:
updateNewExchangein classMulticastProcessor
-
getExchangeIndex
- Overrides:
getExchangeIndexin classMulticastProcessor
-
getExpression
public org.apache.camel.Expression getExpression()
-