@Metadata(label="eip,routing") public class SplitDefinition extends OutputExpressionNode implements ExecutorServiceAwareDefinition<SplitDefinition>
inheritErrorHandler, log
Constructor and Description |
---|
SplitDefinition() |
SplitDefinition(org.apache.camel.Expression expression) |
SplitDefinition(ExpressionDefinition expression) |
Modifier and Type | Method and Description |
---|---|
SplitDefinition |
aggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single
outgoing message from the Splitter.
|
SplitDefinition |
aggregationStrategy(Supplier<org.apache.camel.AggregationStrategy> aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single
outgoing message from the Splitter.
|
SplitDefinition |
aggregationStrategyMethodAllowNull()
If this option is false then the aggregate method is not used if there was no data to enrich.
|
SplitDefinition |
aggregationStrategyMethodAllowNull(boolean aggregationStrategyMethodAllowNull)
If this option is false then the aggregate method is not used if there was no data to enrich.
|
SplitDefinition |
aggregationStrategyMethodAllowNull(String aggregationStrategyMethodAllowNull)
If this option is false then the aggregate method is not used if there was no data to enrich.
|
SplitDefinition |
aggregationStrategyMethodName(String methodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
SplitDefinition |
aggregationStrategyRef(String aggregationStrategyRef)
Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages, into a
single outgoing message from the Splitter.
|
SplitDefinition |
delimiter(String delimiter)
Delimiter used in splitting messages.
|
SplitDefinition |
executorService(ExecutorService executorService)
To use a custom Thread Pool to be used for parallel processing.
|
SplitDefinition |
executorServiceRef(String executorServiceRef)
Refers to a custom Thread Pool to be used for parallel processing.
|
org.apache.camel.AggregationStrategy |
getAggregationStrategy() |
String |
getDelimiter() |
ExecutorService |
getExecutorService() |
String |
getExecutorServiceRef() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
org.apache.camel.Processor |
getOnPrepare() |
String |
getOnPrepareRef() |
String |
getParallelAggregate() |
String |
getParallelProcessing() |
String |
getShareUnitOfWork() |
String |
getShortName() |
String |
getStopOnAggregateException() |
String |
getStopOnException() |
String |
getStrategyMethodAllowNull() |
String |
getStrategyMethodName() |
String |
getStrategyRef() |
String |
getStreaming() |
String |
getTimeout() |
SplitDefinition |
onPrepare(org.apache.camel.Processor onPrepare)
Uses the
Processor when preparing the Exchange to be send. |
SplitDefinition |
onPrepareRef(String onPrepareRef)
Uses the
Processor when preparing the Exchange to be send. |
SplitDefinition |
parallelAggregate()
If enabled then the aggregate method on AggregationStrategy can be called concurrently.
|
SplitDefinition |
parallelAggregate(boolean parallelAggregate)
If enabled then the aggregate method on AggregationStrategy can be called concurrently.
|
SplitDefinition |
parallelAggregate(String parallelAggregate)
If enabled then the aggregate method on AggregationStrategy can be called concurrently.
|
SplitDefinition |
parallelProcessing()
If enabled then processing each splitted messages occurs concurrently.
|
SplitDefinition |
parallelProcessing(boolean parallelProcessing)
If enabled then processing each splitted messages occurs concurrently.
|
SplitDefinition |
parallelProcessing(String parallelProcessing)
If enabled then processing each splitted messages occurs concurrently.
|
void |
setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single
outgoing message from the Splitter.
|
void |
setDelimiter(String delimiter) |
void |
setExecutorService(ExecutorService executorService) |
void |
setExecutorServiceRef(String executorServiceRef) |
void |
setExpression(ExpressionDefinition expression)
Expression of how to split the message body, such as as-is, using a tokenizer, or using an xpath.
|
void |
setOnPrepare(org.apache.camel.Processor onPrepare) |
void |
setOnPrepareRef(String onPrepareRef) |
void |
setParallelAggregate(String parallelAggregate) |
void |
setParallelProcessing(String parallelProcessing) |
void |
setShareUnitOfWork(String shareUnitOfWork) |
void |
setStopOnAggregateException(String stopOnAggregateException) |
void |
setStopOnException(String stopOnException) |
void |
setStrategyMethodAllowNull(String strategyMethodAllowNull)
If this option is false then the aggregate method is not used if there was no data to enrich.
|
void |
setStrategyMethodName(String strategyMethodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
void |
setStrategyRef(String strategyRef)
Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages, into a
single outgoing message from the Splitter.
|
void |
setStreaming(String streaming) |
void |
setTimeout(String timeout) |
SplitDefinition |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and each of the sub messages. |
SplitDefinition |
shareUnitOfWork(boolean shareUnitOfWork)
Shares the
UnitOfWork with the parent and each of the sub messages. |
SplitDefinition |
shareUnitOfWork(String shareUnitOfWork)
Shares the
UnitOfWork with the parent and each of the sub messages. |
SplitDefinition |
stopOnAggregateException()
If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used.
|
SplitDefinition |
stopOnAggregateException(boolean stopOnAggregateException)
If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used.
|
SplitDefinition |
stopOnAggregateException(String stopOnAggregateException)
If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used.
|
SplitDefinition |
stopOnException()
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
SplitDefinition |
stopOnException(boolean stopOnException)
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
SplitDefinition |
stopOnException(String stopOnException)
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
SplitDefinition |
streaming()
When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is
processed one by one.
|
SplitDefinition |
streaming(boolean streaming)
When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is
processed one by one.
|
SplitDefinition |
streaming(String streaming)
When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is
processed one by one.
|
SplitDefinition |
timeout(long timeout)
Sets a total timeout specified in millis, when using parallel processing.
|
SplitDefinition |
timeout(String timeout)
Sets a total timeout specified in millis, when using parallel processing.
|
String |
toString() |
getOutputs, setOutputs
configureChild, getExpression, getExpressionType, id, preCreateProcessor, setExpression, setExpressionType
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
executorService
public SplitDefinition()
public SplitDefinition(org.apache.camel.Expression expression)
public SplitDefinition(ExpressionDefinition expression)
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ExpressionNode
public SplitDefinition delimiter(String delimiter)
delimiter
- the delimiterpublic SplitDefinition aggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
public SplitDefinition aggregationStrategy(Supplier<org.apache.camel.AggregationStrategy> aggregationStrategy)
public SplitDefinition aggregationStrategyRef(String aggregationStrategyRef)
public SplitDefinition aggregationStrategyMethodName(String methodName)
methodName
- the method name to callpublic SplitDefinition aggregationStrategyMethodAllowNull()
public SplitDefinition aggregationStrategyMethodAllowNull(boolean aggregationStrategyMethodAllowNull)
public SplitDefinition aggregationStrategyMethodAllowNull(String aggregationStrategyMethodAllowNull)
public SplitDefinition parallelProcessing()
public SplitDefinition parallelProcessing(boolean parallelProcessing)
public SplitDefinition parallelProcessing(String parallelProcessing)
public SplitDefinition parallelAggregate()
public SplitDefinition parallelAggregate(boolean parallelAggregate)
public SplitDefinition parallelAggregate(String parallelAggregate)
public SplitDefinition stopOnAggregateException()
false
for the sake of backward
compatibility.public SplitDefinition stopOnAggregateException(boolean stopOnAggregateException)
false
for the sake of backward
compatibility.public SplitDefinition stopOnAggregateException(String stopOnAggregateException)
false
for the sake of backward
compatibility.public SplitDefinition streaming()
Exchange.SPLIT_SIZE
is empty.
In non-streaming mode (default) the splitter will split each message first, to know the total size, and then
process each message one by one. This requires to keep all the splitted messages in memory and therefore requires
more memory. The total size is provided in the Exchange.SPLIT_SIZE
header.
The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies
out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the
messages was splitted.public SplitDefinition streaming(boolean streaming)
Exchange.SPLIT_SIZE
is empty.
In non-streaming mode (default) the splitter will split each message first, to know the total size, and then
process each message one by one. This requires to keep all the splitted messages in memory and therefore requires
more memory. The total size is provided in the Exchange.SPLIT_SIZE
header.
The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies
out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the
messages was splitted.public SplitDefinition streaming(String streaming)
Exchange.SPLIT_SIZE
is empty.
In non-streaming mode (default) the splitter will split each message first, to know the total size, and then
process each message one by one. This requires to keep all the splitted messages in memory and therefore requires
more memory. The total size is provided in the Exchange.SPLIT_SIZE
header.
The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies
out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the
messages was splitted.public SplitDefinition stopOnException()
Exchange
and the caused exception will be thrown.
Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by
the error handler (such as using onException). In all situations the splitter will stop further processing. This
is the same behavior as in pipeline, which is used by the routing engine.
The default behavior is to not stop but continue processing till the endpublic SplitDefinition stopOnException(boolean stopOnException)
Exchange
and the caused exception will be thrown.
Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by
the error handler (such as using onException). In all situations the splitter will stop further processing. This
is the same behavior as in pipeline, which is used by the routing engine.
The default behavior is to not stop but continue processing till the endpublic SplitDefinition stopOnException(String stopOnException)
Exchange
and the caused exception will be thrown.
Will also stop if processing the exchange failed (has a fault message) or an exception was thrown and handled by
the error handler (such as using onException). In all situations the splitter will stop further processing. This
is the same behavior as in pipeline, which is used by the routing engine.
The default behavior is to not stop but continue processing till the endpublic SplitDefinition executorService(ExecutorService executorService)
executorService
in interface ExecutorServiceAwareDefinition<SplitDefinition>
executorService
- the executor servicepublic SplitDefinition executorServiceRef(String executorServiceRef)
executorServiceRef
in interface ExecutorServiceAwareDefinition<SplitDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the
Registry
public SplitDefinition onPrepare(org.apache.camel.Processor onPrepare)
Processor
when preparing the Exchange
to be send. This can be used to
deep-clone messages that should be send, or any custom logic needed before the exchange is send.onPrepare
- the processorpublic SplitDefinition onPrepareRef(String onPrepareRef)
Processor
when preparing the Exchange
to be send. This can be used to
deep-clone messages that should be send, or any custom logic needed before the exchange is send.onPrepareRef
- reference to the processor to lookup in the Registry
public SplitDefinition timeout(long timeout)
timeout
- timeout in millispublic SplitDefinition timeout(String timeout)
timeout
- timeout in millispublic SplitDefinition shareUnitOfWork()
UnitOfWork
with the parent and each of the sub messages. Splitter will by
default not share unit of work between the parent exchange and each splitted exchange. This means each splitted
exchange has its own individual unit of work.public SplitDefinition shareUnitOfWork(boolean shareUnitOfWork)
UnitOfWork
with the parent and each of the sub messages. Splitter will by
default not share unit of work between the parent exchange and each splitted exchange. This means each splitted
exchange has its own individual unit of work.public SplitDefinition shareUnitOfWork(String shareUnitOfWork)
UnitOfWork
with the parent and each of the sub messages. Splitter will by
default not share unit of work between the parent exchange and each splitted exchange. This means each splitted
exchange has its own individual unit of work.public void setExpression(ExpressionDefinition expression)
setExpression
in class ExpressionNode
public String getDelimiter()
public void setDelimiter(String delimiter)
public org.apache.camel.AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(org.apache.camel.AggregationStrategy aggregationStrategy)
public String getParallelProcessing()
public void setParallelProcessing(String parallelProcessing)
public String getStreaming()
public void setStreaming(String streaming)
public String getParallelAggregate()
public void setParallelAggregate(String parallelAggregate)
public String getStopOnAggregateException()
public void setStopOnAggregateException(String stopOnAggregateException)
public String getStopOnException()
public void setStopOnException(String stopOnException)
public ExecutorService getExecutorService()
getExecutorService
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
setExecutorService
in interface org.apache.camel.ExecutorServiceAware
public String getStrategyRef()
public void setStrategyRef(String strategyRef)
public String getStrategyMethodName()
public void setStrategyMethodName(String strategyMethodName)
public String getStrategyMethodAllowNull()
public void setStrategyMethodAllowNull(String strategyMethodAllowNull)
public String getExecutorServiceRef()
getExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
setExecutorServiceRef
in interface org.apache.camel.ExecutorServiceAware
public String getTimeout()
public void setTimeout(String timeout)
public String getOnPrepareRef()
public void setOnPrepareRef(String onPrepareRef)
public org.apache.camel.Processor getOnPrepare()
public void setOnPrepare(org.apache.camel.Processor onPrepare)
public String getShareUnitOfWork()
public void setShareUnitOfWork(String shareUnitOfWork)
Apache Camel