public class SplitDefinition extends ExpressionNode implements ExecutorServiceAwareDefinition<SplitDefinition>
inheritErrorHandler, log| Constructor and Description |
|---|
SplitDefinition() |
SplitDefinition(Expression expression) |
SplitDefinition(ExpressionDefinition expression) |
| Modifier and Type | Method and Description |
|---|---|
SplitDefinition |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the aggregationStrategy
|
SplitDefinition |
aggregationStrategyMethodAllowNull()
Sets allowing null when using a POJO as
AggregationStrategy. |
SplitDefinition |
aggregationStrategyMethodName(java.lang.String methodName)
Sets the method name to use when using a POJO as
AggregationStrategy. |
SplitDefinition |
aggregationStrategyRef(java.lang.String aggregationStrategyRef)
Set the aggregationStrategy
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
SplitDefinition |
executorService(java.util.concurrent.ExecutorService executorService)
Setting the executor service for executing
|
SplitDefinition |
executorServiceRef(java.lang.String executorServiceRef)
Setting the executor service for executing
|
AggregationStrategy |
getAggregationStrategy() |
java.util.concurrent.ExecutorService |
getExecutorService()
Gets the executor service
|
java.lang.String |
getExecutorServiceRef()
Gets the reference to lookup in the
Registry for the executor service to be used. |
java.lang.String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
Processor |
getOnPrepare() |
java.lang.String |
getOnPrepareRef() |
java.lang.Boolean |
getParallelProcessing() |
java.lang.Boolean |
getShareUnitOfWork() |
java.lang.String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images
|
java.lang.Boolean |
getStopOnException() |
java.lang.Boolean |
getStrategyMethodAllowNull() |
java.lang.String |
getStrategyMethodName() |
java.lang.String |
getStrategyRef() |
java.lang.Boolean |
getStreaming() |
java.lang.Long |
getTimeout() |
boolean |
isParallelProcessing() |
boolean |
isShareUnitOfWork() |
java.lang.Boolean |
isStopOnException() |
boolean |
isStreaming()
The splitter should use streaming -- exchanges are being sent as the data for them becomes available.
|
SplitDefinition |
onPrepare(Processor onPrepare)
|
SplitDefinition |
onPrepareRef(java.lang.String onPrepareRef)
|
SplitDefinition |
parallelProcessing()
Doing the splitting work in parallel
|
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy) |
void |
setExecutorService(java.util.concurrent.ExecutorService executorService)
Sets the executor service to be used.
|
void |
setExecutorServiceRef(java.lang.String executorServiceRef)
Sets a reference to lookup in the
Registry for the executor service to be used. |
void |
setOnPrepare(Processor onPrepare) |
void |
setOnPrepareRef(java.lang.String onPrepareRef) |
void |
setParallelProcessing(java.lang.Boolean parallelProcessing) |
void |
setShareUnitOfWork(java.lang.Boolean shareUnitOfWork) |
void |
setStopOnException(java.lang.Boolean stopOnException) |
void |
setStrategyMethodAllowNull(java.lang.Boolean strategyMethodAllowNull) |
void |
setStrategyMethodName(java.lang.String strategyMethodName) |
void |
setStrategyRef(java.lang.String strategyRef) |
void |
setStreaming(java.lang.Boolean streaming) |
void |
setTimeout(java.lang.Long timeout) |
SplitDefinition |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and each of the sub messages. |
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 |
streaming()
Enables streaming.
|
SplitDefinition |
timeout(long timeout)
Sets a timeout value in millis to use when using parallelProcessing.
|
java.lang.String |
toString() |
configureChild, createFilterProcessor, createPredicate, getExpression, getOutputs, isOutputSupported, preCreateProcessor, setExpression, setOutputsaddInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, enrich, enrich, enrichRef, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, loadBalance, loadBalance, log, log, log, log, loop, loop, loop, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperty, resequence, resequence, resolveKnownConstantFields, resolvePropertyPlaceholders, rollback, rollback, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, stop, threads, threads, threads, threads, throttle, throttle, throwException, to, to, to, to, to, to, to, to, to, to, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapInErrorHandler, wrapProcessordescription, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, isCustomId, setCustomId, setDescription, setIdpublic SplitDefinition()
public SplitDefinition(Expression expression)
public SplitDefinition(ExpressionDefinition expression)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getShortName()
OptionalIdentifiedDefinitiongetShortName in interface NamedNodegetShortName in class ExpressionNodepublic java.lang.String getLabel()
ProcessorDefinitiongetLabel in interface NamedNodegetLabel in class ExpressionNodepublic Processor createProcessor(RouteContext routeContext) throws java.lang.Exception
ProcessorDefinitioncreateProcessor in class ProcessorDefinition<ExpressionNode>java.lang.Exceptionpublic SplitDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
public SplitDefinition aggregationStrategyRef(java.lang.String aggregationStrategyRef)
aggregationStrategyRef - a reference to a strategy to lookuppublic SplitDefinition aggregationStrategyMethodName(java.lang.String methodName)
AggregationStrategy.methodName - the method name to callpublic SplitDefinition aggregationStrategyMethodAllowNull()
AggregationStrategy.public SplitDefinition parallelProcessing()
public SplitDefinition streaming()
isStreaming() for more informationpublic 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 executorService(java.util.concurrent.ExecutorService executorService)
ExecutorServiceAwareDefinitionexecutorService in interface ExecutorServiceAwareDefinition<SplitDefinition>executorService - the executor servicepublic SplitDefinition executorServiceRef(java.lang.String executorServiceRef)
ExecutorServiceAwareDefinitionexecutorServiceRef in interface ExecutorServiceAwareDefinition<SplitDefinition>executorServiceRef - reference for a ExecutorService
to lookup in the Registrypublic SplitDefinition onPrepare(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(java.lang.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 Registrypublic SplitDefinition timeout(long timeout)
timeout - timeout in millispublic SplitDefinition shareUnitOfWork()
UnitOfWork with the parent and each of the sub messages.SubUnitOfWorkpublic AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public java.lang.Boolean getParallelProcessing()
public void setParallelProcessing(java.lang.Boolean parallelProcessing)
public boolean isParallelProcessing()
public java.lang.Boolean getStreaming()
public void setStreaming(java.lang.Boolean streaming)
public boolean isStreaming()
Exchange.SPLIT_SIZE header propertypublic java.lang.Boolean getStopOnException()
public void setStopOnException(java.lang.Boolean stopOnException)
public java.lang.Boolean isStopOnException()
public java.util.concurrent.ExecutorService getExecutorService()
ExecutorServiceAwaregetExecutorService in interface ExecutorServiceAwarepublic void setExecutorService(java.util.concurrent.ExecutorService executorService)
ExecutorServiceAwaresetExecutorService in interface ExecutorServiceAwareexecutorService - the executorpublic java.lang.String getStrategyRef()
public void setStrategyRef(java.lang.String strategyRef)
public java.lang.String getStrategyMethodName()
public void setStrategyMethodName(java.lang.String strategyMethodName)
public java.lang.Boolean getStrategyMethodAllowNull()
public void setStrategyMethodAllowNull(java.lang.Boolean strategyMethodAllowNull)
public java.lang.String getExecutorServiceRef()
ExecutorServiceAwareRegistry for the executor service to be used.getExecutorServiceRef in interface ExecutorServiceAwarepublic void setExecutorServiceRef(java.lang.String executorServiceRef)
ExecutorServiceAwareRegistry for the executor service to be used.setExecutorServiceRef in interface ExecutorServiceAwareexecutorServiceRef - reference for the executorpublic java.lang.Long getTimeout()
public void setTimeout(java.lang.Long timeout)
public java.lang.String getOnPrepareRef()
public void setOnPrepareRef(java.lang.String onPrepareRef)
public Processor getOnPrepare()
public void setOnPrepare(Processor onPrepare)
public java.lang.Boolean getShareUnitOfWork()
public void setShareUnitOfWork(java.lang.Boolean shareUnitOfWork)
public boolean isShareUnitOfWork()
Copyright © 2007-2014 Red Hat, Inc.. All Rights Reserved.