public class MulticastDefinition extends OutputDefinition<MulticastDefinition> implements ExecutorServiceAwareDefinition<MulticastDefinition>
outputs
inheritErrorHandler, log
Constructor and Description |
---|
MulticastDefinition() |
Modifier and Type | Method and Description |
---|---|
MulticastDefinition |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the multicasting aggregationStrategy
|
MulticastDefinition |
aggregationStrategyMethodAllowNull()
Sets allowing null when using a POJO as
AggregationStrategy . |
MulticastDefinition |
aggregationStrategyMethodName(String methodName)
Sets the method name to use when using a POJO as
AggregationStrategy . |
MulticastDefinition |
aggregationStrategyRef(String aggregationStrategyRef)
Set the aggregationStrategy
|
protected Processor |
createCompositeProcessor(RouteContext routeContext,
List<Processor> list)
Creates a new instance of some kind of composite processor which defaults
to using a
Pipeline but derived classes could change the behaviour |
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor
based on the definition model.
|
MulticastDefinition |
executorService(ExecutorService executorService)
Setting the executor service for executing
|
MulticastDefinition |
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 |
getParallelAggregate() |
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() |
Boolean |
getStrategyMethodAllowNull() |
String |
getStrategyMethodName() |
String |
getStrategyRef() |
Boolean |
getStreaming() |
Long |
getTimeout() |
boolean |
isParallelAggregate()
Whether to aggregate using a sequential single thread, or allow parallel aggregation.
|
boolean |
isParallelProcessing() |
boolean |
isShareUnitOfWork() |
Boolean |
isStopOnException() |
boolean |
isStreaming() |
MulticastDefinition |
onPrepare(Processor onPrepare)
|
MulticastDefinition |
onPrepareRef(String onPrepareRef)
|
MulticastDefinition |
parallelAggregate()
Doing the aggregate work in parallel
Notice that if enabled, then the
AggregationStrategy in use
must be implemented as thread safe, as concurrent threads can call the aggregate methods at the same time. |
MulticastDefinition |
parallelProcessing()
Uses the
ExecutorService to do the multicasting work |
MulticastDefinition |
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 |
setParallelAggregate(Boolean parallelAggregate) |
void |
setParallelProcessing(Boolean parallelProcessing) |
void |
setShareUnitOfWork(Boolean shareUnitOfWork) |
void |
setStopOnException(Boolean stopOnException) |
void |
setStrategyMethodAllowNull(Boolean strategyMethodAllowNull) |
void |
setStrategyMethodName(String strategyMethodName) |
void |
setStrategyRef(String strategyRef) |
void |
setStreaming(Boolean streaming) |
void |
setTimeout(Long timeout) |
MulticastDefinition |
shareUnitOfWork()
Shares the
UnitOfWork with the parent and each of the sub messages. |
MulticastDefinition |
stopOnException()
Will now stop further processing if an exception or failure occurred during processing of an
Exchange and the caused exception will be thrown. |
MulticastDefinition |
streaming()
Aggregates the responses as the are done (e.g.
|
MulticastDefinition |
timeout(long timeout)
Sets a timeout value in millis to use when using parallelProcessing.
|
String |
toString() |
getOutputs, isOutputSupported, setOutputs
addInterceptStrategies, addInterceptStrategy, addOutput, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, bean, bean, bean, beanRef, beanRef, beanRef, beanRef, beanRef, choice, clearOutput, configureChild, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createOutputsProcessor, createOutputsProcessor, createProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endDoTry, endParent, endRest, enrich, enrich, enrich, enrichRef, 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, 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, pollEnrich, pollEnrichRef, pollEnrichRef, preCreateProcessor, process, processRef, recipientList, recipientList, recipientList, recipientList, removeFaultHeader, removeHeader, removeHeaders, removeHeaders, removeProperty, resequence, resequence, 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, startupOrder, 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, wrapProcessor
description, description, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, isCustomId, setCustomId, setDescription, setId
public MulticastDefinition()
public String toString()
toString
in class OutputDefinition<MulticastDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in interface NamedNode
getLabel
in class ProcessorDefinition<MulticastDefinition>
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in interface NamedNode
getShortName
in class OutputDefinition<MulticastDefinition>
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<MulticastDefinition>
Exception
public MulticastDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
public MulticastDefinition aggregationStrategyRef(String aggregationStrategyRef)
aggregationStrategyRef
- a reference to a strategy to lookuppublic MulticastDefinition aggregationStrategyMethodName(String methodName)
AggregationStrategy
.methodName
- the method name to callpublic MulticastDefinition aggregationStrategyMethodAllowNull()
AggregationStrategy
.public MulticastDefinition parallelProcessing()
ExecutorService
to do the multicasting workpublic MulticastDefinition parallelAggregate()
AggregationStrategy
in use
must be implemented as thread safe, as concurrent threads can call the aggregate methods at the same time.public MulticastDefinition streaming()
public MulticastDefinition 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 multicast 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 MulticastDefinition executorService(ExecutorService executorService)
ExecutorServiceAwareDefinition
executorService
in interface ExecutorServiceAwareDefinition<MulticastDefinition>
executorService
- the executor servicepublic MulticastDefinition executorServiceRef(String executorServiceRef)
ExecutorServiceAwareDefinition
executorServiceRef
in interface ExecutorServiceAwareDefinition<MulticastDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the Registry
public MulticastDefinition 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 MulticastDefinition 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 MulticastDefinition timeout(long timeout)
timeout
- timeout in millispublic MulticastDefinition shareUnitOfWork()
UnitOfWork
with the parent and each of the sub messages.SubUnitOfWork
protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list) throws Exception
ProcessorDefinition
Pipeline
but derived classes could change the behaviourcreateCompositeProcessor
in class ProcessorDefinition<MulticastDefinition>
Exception
public AggregationStrategy getAggregationStrategy()
public MulticastDefinition 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()
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 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 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()
public Boolean getParallelAggregate()
public boolean isParallelAggregate()
AggregationStrategy
in use
must be implemented as thread safe, as concurrent threads can call the aggregate methods at the same time.public void setParallelAggregate(Boolean parallelAggregate)
Apache Camel