@Metadata(label="eip,endpoint,routing") public class RecipientListDefinition<Type extends ProcessorDefinition<Type>> extends NoOutputExpressionNode implements ExecutorServiceAwareDefinition<RecipientListDefinition<Type>>
inheritErrorHandler, log
Constructor and Description |
---|
RecipientListDefinition() |
RecipientListDefinition(Expression expression) |
RecipientListDefinition(ExpressionDefinition expression) |
Modifier and Type | Method and Description |
---|---|
RecipientListDefinition<Type> |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message from the RecipientList.
|
RecipientListDefinition<Type> |
aggregationStrategyMethodAllowNull()
If this option is false then the aggregate method is not used if there was no data to enrich.
|
RecipientListDefinition<Type> |
aggregationStrategyMethodName(String methodName)
This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
|
RecipientListDefinition<Type> |
aggregationStrategyRef(String aggregationStrategyRef)
Sets a reference to the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message from the RecipientList.
|
RecipientListDefinition<Type> |
cacheSize(int cacheSize)
Sets the maximum size used by the
ProducerCache which is used
to cache and reuse producers when using this recipient list, when uris are reused. |
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
RecipientListDefinition<Type> |
delimiter(String delimiter)
Delimiter used if the Expression returned multiple endpoints.
|
Type |
end()
Ends the current block
|
RecipientListDefinition<Type> |
executorService(ExecutorService executorService)
To use a custom Thread Pool to be used for parallel processing.
|
RecipientListDefinition<Type> |
executorServiceRef(String executorServiceRef)
Refers to a custom Thread Pool to be used for parallel processing.
|
AggregationStrategy |
getAggregationStrategy() |
Integer |
getCacheSize() |
String |
getDelimiter() |
ExecutorService |
getExecutorService()
Gets the executor service
|
String |
getExecutorServiceRef()
Gets the reference to lookup in the
Registry for the executor service to be used. |
Boolean |
getIgnoreInvalidEndpoints() |
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
Processor |
getOnPrepare() |
String |
getOnPrepareRef() |
Boolean |
getParallelAggregate() |
Boolean |
getParallelProcessing() |
Boolean |
getShareUnitOfWork() |
Boolean |
getStopOnException() |
Boolean |
getStrategyMethodAllowNull() |
String |
getStrategyMethodName() |
String |
getStrategyRef() |
Boolean |
getStreaming() |
Long |
getTimeout() |
RecipientListDefinition<Type> |
ignoreInvalidEndpoints()
Ignore the invalidate endpoint exception when try to create a producer with that endpoint
|
RecipientListDefinition<Type> |
onPrepare(Processor onPrepare)
|
RecipientListDefinition<Type> |
onPrepareRef(String onPrepareRef)
|
RecipientListDefinition<Type> |
parallelAggregate()
If enabled then the aggregate method on AggregationStrategy can be called concurrently.
|
RecipientListDefinition<Type> |
parallelProcessing()
If enabled then sending messages to the recipients occurs concurrently.
|
RecipientListDefinition<Type> |
parallelProcessing(boolean parallelProcessing)
If enabled then sending messages to the recipients occurs concurrently.
|
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy)
Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message from the RecipientList.
|
void |
setCacheSize(Integer cacheSize) |
void |
setDelimiter(String delimiter) |
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 |
setExpression(ExpressionDefinition expression)
Expression that returns which endpoints (url) to send the message to (the recipients).
|
void |
setIgnoreInvalidEndpoints(Boolean ignoreInvalidEndpoints) |
void |
setOnPrepare(Processor onPrepare) |
void |
setOnPrepareRef(String onPrepareRef) |
void |
setParallelAggregate(Boolean parallelAggregate) |
void |
setParallelProcessing(Boolean parallelProcessing) |
void |
setShareUnitOfWork(Boolean shareUnitOfWork) |
void |
setStopOnException(Boolean stopOnException) |
void |
setStrategyMethodAllowNull(Boolean 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 recipients, into a single outgoing message from the RecipientList.
|
void |
setStreaming(Boolean streaming) |
void |
setTimeout(Long timeout) |
RecipientListDefinition<Type> |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and each of the sub messages. |
RecipientListDefinition<Type> |
stopOnException()
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
RecipientListDefinition<Type> |
streaming()
If enabled then Camel will process replies out-of-order, eg in the order they come back.
|
RecipientListDefinition<Type> |
timeout(long timeout)
Sets a total timeout specified in millis, when using parallel processing.
|
String |
toString() |
addOutput, getOutputs, id, isOutputSupported
configureChild, createFilterProcessor, createPredicate, getExpression, preCreateProcessor, setOutputs
addInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, createOutputsProcessorImpl, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrichRef, enrichRef, enrichRef, filter, filter, filter, filter, getIndex, getInterceptStrategies, getOtherAttributes, getParent, 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, log, log, loop, loop, loop, loopDoWhile, makeProcessor, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, placeholder, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichRef, pollEnrichRef, process, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeId, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, routingSlip, sample, sample, sample, script, script, setBody, setBody, setExchangePattern, setFaultBody, setFaultHeader, setHeader, setHeader, setInheritErrorHandler, setOtherAttributes, setOutHeader, setOutHeader, setParent, setProperty, setProperty, sort, sort, sort, split, split, split, startupOrder, stop, threads, threads, threads, threads, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wireTap, wrapChannel, wrapChannel, wrapInErrorHandler, wrapProcessor
description, description, getCustomId, getDescription, getDescriptionText, getId, getShortName, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setId
public RecipientListDefinition()
public RecipientListDefinition(ExpressionDefinition expression)
public RecipientListDefinition(Expression expression)
public String getLabel()
ProcessorDefinition
getLabel
in interface NamedNode
getLabel
in class ExpressionNode
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<ExpressionNode>
Exception
public Type end()
ProcessorDefinition
end
in class ProcessorDefinition<ExpressionNode>
public RecipientListDefinition<Type> delimiter(String delimiter)
delimiter
- the delimiterpublic RecipientListDefinition<Type> aggregationStrategy(AggregationStrategy aggregationStrategy)
public RecipientListDefinition<Type> aggregationStrategyRef(String aggregationStrategyRef)
public RecipientListDefinition<Type> aggregationStrategyMethodName(String methodName)
methodName
- the method name to callpublic RecipientListDefinition<Type> aggregationStrategyMethodAllowNull()
public RecipientListDefinition<Type> ignoreInvalidEndpoints()
public RecipientListDefinition<Type> parallelProcessing()
public RecipientListDefinition<Type> parallelProcessing(boolean parallelProcessing)
public RecipientListDefinition<Type> parallelAggregate()
public RecipientListDefinition<Type> streaming()
public RecipientListDefinition<Type> 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 recipient list 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 RecipientListDefinition<Type> executorService(ExecutorService executorService)
executorService
in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
executorService
- the executor servicepublic RecipientListDefinition<Type> executorServiceRef(String executorServiceRef)
executorServiceRef
in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
executorServiceRef
- reference for a ExecutorService
to lookup in the Registry
public RecipientListDefinition<Type> onPrepare(Processor onPrepare)
Processor
when preparing the Exchange
to be used 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 RecipientListDefinition<Type> 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 RecipientListDefinition<Type> timeout(long timeout)
timeout
- timeout in millispublic RecipientListDefinition<Type> shareUnitOfWork()
UnitOfWork
with the parent and each of the sub messages.
Recipient List will by default not share unit of work between the parent exchange and each recipient exchange.
This means each sub exchange has its own individual unit of work.SubUnitOfWork
public RecipientListDefinition<Type> cacheSize(int cacheSize)
ProducerCache
which is used
to cache and reuse producers when using this recipient list, when uris are reused.cacheSize
- the cache size, use 0 for default cache size, or -1 to turn cache off.public void setExpression(ExpressionDefinition expression)
setExpression
in class ExpressionNode
public String getDelimiter()
public void setDelimiter(String delimiter)
public Boolean getParallelProcessing()
public void setParallelProcessing(Boolean parallelProcessing)
public String getStrategyRef()
public void setStrategyRef(String strategyRef)
public String getStrategyMethodName()
public void setStrategyMethodName(String strategyMethodName)
public Boolean getStrategyMethodAllowNull()
public void setStrategyMethodAllowNull(Boolean strategyMethodAllowNull)
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 Boolean getIgnoreInvalidEndpoints()
public void setIgnoreInvalidEndpoints(Boolean ignoreInvalidEndpoints)
public Boolean getStopOnException()
public void setStopOnException(Boolean stopOnException)
public AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public ExecutorService getExecutorService()
ExecutorServiceAware
getExecutorService
in interface ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
ExecutorServiceAware
setExecutorService
in interface ExecutorServiceAware
executorService
- the executorpublic Boolean getStreaming()
public void setStreaming(Boolean streaming)
public 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 Integer getCacheSize()
public void setCacheSize(Integer cacheSize)
public Boolean getParallelAggregate()
public void setParallelAggregate(Boolean parallelAggregate)
Apache Camel