|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.OptionalIdentifiedDefinition
org.apache.camel.model.ProcessorDefinition<ExpressionNode>
org.apache.camel.model.ExpressionNode
org.apache.camel.model.SplitDefinition
public class SplitDefinition
Represents an XML <split/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
errorHandlerBuilder, errorHandlerRef, inheritErrorHandler, log |
Constructor Summary | |
---|---|
SplitDefinition()
|
|
SplitDefinition(Expression expression)
|
|
SplitDefinition(ExpressionDefinition expression)
|
Method Summary | |
---|---|
SplitDefinition |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the aggregationStrategy |
SplitDefinition |
aggregationStrategyRef(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(ExecutorService executorService)
Setting the executor service for executing |
SplitDefinition |
executorServiceRef(String executorServiceRef)
Setting the executor service for executing |
AggregationStrategy |
getAggregationStrategy()
|
ExecutorService |
getExecutorService()
Gets the executor service |
String |
getExecutorServiceRef()
Gets the reference to lookup in the Registry for the executor service to be used. |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node |
Processor |
getOnPrepare()
|
String |
getOnPrepareRef()
|
Boolean |
getParallelProcessing()
|
Boolean |
getShareUnitOfWork()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
Boolean |
getStopOnException()
|
String |
getStrategyRef()
|
Boolean |
getStreaming()
|
Long |
getTimeout()
|
boolean |
isParallelProcessing()
|
boolean |
isShareUnitOfWork()
|
Boolean |
isStopOnException()
|
boolean |
isStreaming()
The splitter should use streaming -- exchanges are being sent as the data for them becomes available. |
SplitDefinition |
onPrepare(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 |
parallelProcessing()
Doing the splitting work in parallel |
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy)
|
void |
setExecutorService(ExecutorService executorService)
Sets the executor service to be used. |
void |
setExecutorServiceRef(String executorServiceRef)
Sets a reference to lookup in the Registry for the executor service to be used. |
void |
setOnPrepare(Processor onPrepare)
|
void |
setOnPrepareRef(String onPrepareRef)
|
void |
setParallelProcessing(Boolean parallelProcessing)
|
void |
setShareUnitOfWork(Boolean shareUnitOfWork)
|
void |
setStopOnException(Boolean stopOnException)
|
void |
setStrategyRef(String strategyRef)
|
void |
setStreaming(Boolean streaming)
|
void |
setTimeout(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. |
String |
toString()
|
Methods inherited from class org.apache.camel.model.ExpressionNode |
---|
configureChild, createFilterProcessor, getExpression, getOutputs, isOutputSupported, setExpression, setOutputs |
Methods inherited from class org.apache.camel.model.OptionalIdentifiedDefinition |
---|
description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setDescription, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SplitDefinition()
public SplitDefinition(Expression expression)
public SplitDefinition(ExpressionDefinition expression)
Method Detail |
---|
public String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in class ExpressionNode
public String getLabel()
ProcessorDefinition
getLabel
in class ExpressionNode
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<ExpressionNode>
Exception
public SplitDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
public SplitDefinition aggregationStrategyRef(String aggregationStrategyRef)
aggregationStrategyRef
- a reference to a strategy to lookup
public SplitDefinition parallelProcessing()
public SplitDefinition streaming()
isStreaming()
for more information
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 end
public SplitDefinition executorService(ExecutorService executorService)
ExecutorServiceAwareDefinition
executorService
in interface ExecutorServiceAwareDefinition<SplitDefinition>
executorService
- the executor service
public SplitDefinition executorServiceRef(String executorServiceRef)
ExecutorServiceAwareDefinition
executorServiceRef
in interface ExecutorServiceAwareDefinition<SplitDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the Registry
public 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 processor
public 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 millis
public SplitDefinition shareUnitOfWork()
UnitOfWork
with the parent and each of the sub messages.
SubUnitOfWork
public AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public Boolean getParallelProcessing()
public void setParallelProcessing(Boolean parallelProcessing)
public boolean isParallelProcessing()
public Boolean getStreaming()
public void setStreaming(Boolean streaming)
public boolean isStreaming()
Exchange.SPLIT_SIZE
header property
public Boolean getStopOnException()
public void setStopOnException(Boolean stopOnException)
public Boolean isStopOnException()
public ExecutorService getExecutorService()
ExecutorServiceAware
getExecutorService
in interface ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
ExecutorServiceAware
setExecutorService
in interface ExecutorServiceAware
executorService
- the executorpublic String getStrategyRef()
public void setStrategyRef(String strategyRef)
public String getExecutorServiceRef()
ExecutorServiceAware
Registry
for the executor service to be used.
getExecutorServiceRef
in interface ExecutorServiceAware
public void setExecutorServiceRef(String executorServiceRef)
ExecutorServiceAware
Registry
for the executor service to be used.
setExecutorServiceRef
in interface ExecutorServiceAware
executorServiceRef
- reference for the executorpublic Long getTimeout()
public void setTimeout(Long timeout)
public String getOnPrepareRef()
public void setOnPrepareRef(String onPrepareRef)
public Processor getOnPrepare()
public void setOnPrepare(Processor onPrepare)
public Boolean getShareUnitOfWork()
public void setShareUnitOfWork(Boolean shareUnitOfWork)
public boolean isShareUnitOfWork()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |