org.apache.camel.model
Class RecipientListDefinition<Type extends ProcessorDefinition<Type>>

java.lang.Object
  extended by org.apache.camel.model.OptionalIdentifiedDefinition<Type>
      extended by org.apache.camel.model.ProcessorDefinition<ExpressionNode>
          extended by org.apache.camel.model.ExpressionNode
              extended by org.apache.camel.model.NoOutputExpressionNode
                  extended by org.apache.camel.model.RecipientListDefinition<Type>
All Implemented Interfaces:
ExecutorServiceAware, Block, ExecutorServiceAwareDefinition<RecipientListDefinition<Type>>, NamedNode

public class RecipientListDefinition<Type extends ProcessorDefinition<Type>>
extends NoOutputExpressionNode
implements ExecutorServiceAwareDefinition<RecipientListDefinition<Type>>

Represents an XML <recipientList/> element

Version:

Field Summary
 
Fields inherited from class org.apache.camel.model.ProcessorDefinition
inheritErrorHandler, log
 
Constructor Summary
RecipientListDefinition()
           
RecipientListDefinition(Expression expression)
           
RecipientListDefinition(ExpressionDefinition expression)
           
 
Method Summary
 RecipientListDefinition<Type> aggregationStrategy(AggregationStrategy aggregationStrategy)
          Set the aggregationStrategy
 RecipientListDefinition<Type> 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.
 RecipientListDefinition<Type> delimiter(String delimiter)
          Set the delimiter
 Type end()
          Ends the current block
 RecipientListDefinition<Type> executorService(ExecutorService executorService)
          Setting the executor service for executing
 RecipientListDefinition<Type> executorServiceRef(String executorServiceRef)
          Setting the executor service for executing
 AggregationStrategy getAggregationStrategy()
           
 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 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()
           
 RecipientListDefinition<Type> ignoreInvalidEndpoints()
          Ignore the invalidate endpoint exception when try to create a producer with that endpoint
 boolean isIgnoreInvalidEndpoints()
           
 boolean isParallelProcessing()
           
 boolean isShareUnitOfWork()
           
 boolean isStopOnException()
           
 boolean isStreaming()
           
 RecipientListDefinition<Type> onPrepare(Processor onPrepare)
          Uses the Processor when preparing the Exchange to be used send.
 RecipientListDefinition<Type> onPrepareRef(String onPrepareRef)
          Uses the Processor when preparing the Exchange to be send.
 RecipientListDefinition<Type> parallelProcessing()
          Doing the recipient list work in parallel
 void setAggregationStrategy(AggregationStrategy aggregationStrategy)
           
 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 setIgnoreInvalidEndpoints(Boolean ignoreInvalidEndpoints)
           
 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)
           
 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()
          Doing the recipient list work in streaming model
 RecipientListDefinition<Type> timeout(long timeout)
          Sets a timeout value in millis to use when using parallelProcessing.
 String toString()
           
 
Methods inherited from class org.apache.camel.model.NoOutputExpressionNode
addOutput, getOutputs, id, isOutputSupported
 
Methods inherited from class org.apache.camel.model.ExpressionNode
configureChild, createFilterProcessor, createPredicate, getExpression, preCreateProcessor, setExpression, setOutputs
 
Methods inherited from class org.apache.camel.model.ProcessorDefinition
addInterceptStrategies, addInterceptStrategy, addRoutes, aggregate, aggregate, aggregate, aggregate, aop, attribute, bean, bean, bean, bean, beanRef, beanRef, choice, clearOutput, convertBodyTo, convertBodyTo, createChannel, createChildProcessor, createCompositeProcessor, createOutputsProcessor, createOutputsProcessor, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, endChoice, endDoTry, endParent, enrich, enrich, enrichRef, filter, filter, filter, filter, getInterceptStrategies, getNodeFactory, getOtherAttributes, getParent, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, 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, 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, setNodeFactory, 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, wrapProcessor
 
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

RecipientListDefinition

public RecipientListDefinition()

RecipientListDefinition

public RecipientListDefinition(ExpressionDefinition expression)

RecipientListDefinition

public RecipientListDefinition(Expression expression)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getShortName

public String getShortName()
Description copied from class: OptionalIdentifiedDefinition
Returns a short name for this node which can be useful for ID generation or referring to related resources like images

Specified by:
getShortName in interface NamedNode
Overrides:
getShortName in class ExpressionNode
Returns:
defaults to "node" but derived nodes should overload this to provide a unique name

getLabel

public String getLabel()
Description copied from class: ProcessorDefinition
Returns a label to describe this node such as the expression if some kind of expression node

Overrides:
getLabel in class ExpressionNode

createProcessor

public Processor createProcessor(RouteContext routeContext)
                          throws Exception
Description copied from class: ProcessorDefinition
Override this in definition class and implement logic to create the processor based on the definition model.

Overrides:
createProcessor in class ProcessorDefinition<ExpressionNode>
Throws:
Exception

end

public Type end()
Description copied from class: ProcessorDefinition
Ends the current block

Overrides:
end in class ProcessorDefinition<ExpressionNode>
Returns:
the builder

delimiter

public RecipientListDefinition<Type> delimiter(String delimiter)
Set the delimiter

Parameters:
delimiter - the delimiter
Returns:
the builder

aggregationStrategy

public RecipientListDefinition<Type> aggregationStrategy(AggregationStrategy aggregationStrategy)
Set the aggregationStrategy

Parameters:
aggregationStrategy - the strategy
Returns:
the builder

aggregationStrategyRef

public RecipientListDefinition<Type> aggregationStrategyRef(String aggregationStrategyRef)
Set the aggregationStrategy

Parameters:
aggregationStrategyRef - a reference to a strategy to lookup
Returns:
the builder

ignoreInvalidEndpoints

public RecipientListDefinition<Type> ignoreInvalidEndpoints()
Ignore the invalidate endpoint exception when try to create a producer with that endpoint

Returns:
the builder

parallelProcessing

public RecipientListDefinition<Type> parallelProcessing()
Doing the recipient list work in parallel

Returns:
the builder

streaming

public RecipientListDefinition<Type> streaming()
Doing the recipient list work in streaming model

Returns:
the builder

stopOnException

public 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.

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 end

Returns:
the builder

executorService

public RecipientListDefinition<Type> executorService(ExecutorService executorService)
Description copied from interface: ExecutorServiceAwareDefinition
Setting the executor service for executing

Specified by:
executorService in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
Parameters:
executorService - the executor service
Returns:
the builder

executorServiceRef

public RecipientListDefinition<Type> executorServiceRef(String executorServiceRef)
Description copied from interface: ExecutorServiceAwareDefinition
Setting the executor service for executing

Specified by:
executorServiceRef in interface ExecutorServiceAwareDefinition<RecipientListDefinition<Type extends ProcessorDefinition<Type>>>
Parameters:
executorServiceRef - reference for a ExecutorService to lookup in the Registry
Returns:
the builder

onPrepare

public RecipientListDefinition<Type> onPrepare(Processor onPrepare)
Uses the 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.

Parameters:
onPrepare - the processor
Returns:
the builder

onPrepareRef

public RecipientListDefinition<Type> onPrepareRef(String onPrepareRef)
Uses the 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.

Parameters:
onPrepareRef - reference to the processor to lookup in the Registry
Returns:
the builder

timeout

public RecipientListDefinition<Type> timeout(long timeout)
Sets a timeout value in millis to use when using parallelProcessing.

Parameters:
timeout - timeout in millis
Returns:
the builder

shareUnitOfWork

public RecipientListDefinition<Type> shareUnitOfWork()
Shares the UnitOfWork with the parent and each of the sub messages.

Returns:
the builder.
See Also:
SubUnitOfWork

getDelimiter

public String getDelimiter()

setDelimiter

public void setDelimiter(String delimiter)

getParallelProcessing

public Boolean getParallelProcessing()

setParallelProcessing

public void setParallelProcessing(Boolean parallelProcessing)

isParallelProcessing

public boolean isParallelProcessing()

getStrategyRef

public String getStrategyRef()

setStrategyRef

public void setStrategyRef(String strategyRef)

getExecutorServiceRef

public String getExecutorServiceRef()
Description copied from interface: ExecutorServiceAware
Gets the reference to lookup in the Registry for the executor service to be used.

Specified by:
getExecutorServiceRef in interface ExecutorServiceAware
Returns:
the reference, or null if the executor was set directly

setExecutorServiceRef

public void setExecutorServiceRef(String executorServiceRef)
Description copied from interface: ExecutorServiceAware
Sets a reference to lookup in the Registry for the executor service to be used.

Specified by:
setExecutorServiceRef in interface ExecutorServiceAware
Parameters:
executorServiceRef - reference for the executor

getIgnoreInvalidEndpoints

public Boolean getIgnoreInvalidEndpoints()

setIgnoreInvalidEndpoints

public void setIgnoreInvalidEndpoints(Boolean ignoreInvalidEndpoints)

isIgnoreInvalidEndpoints

public boolean isIgnoreInvalidEndpoints()

getStopOnException

public Boolean getStopOnException()

setStopOnException

public void setStopOnException(Boolean stopOnException)

isStopOnException

public boolean isStopOnException()

getAggregationStrategy

public AggregationStrategy getAggregationStrategy()

setAggregationStrategy

public void setAggregationStrategy(AggregationStrategy aggregationStrategy)

getExecutorService

public ExecutorService getExecutorService()
Description copied from interface: ExecutorServiceAware
Gets the executor service

Specified by:
getExecutorService in interface ExecutorServiceAware
Returns:
the executor

setExecutorService

public void setExecutorService(ExecutorService executorService)
Description copied from interface: ExecutorServiceAware
Sets the executor service to be used.

Specified by:
setExecutorService in interface ExecutorServiceAware
Parameters:
executorService - the executor

getStreaming

public Boolean getStreaming()

setStreaming

public void setStreaming(Boolean streaming)

isStreaming

public boolean isStreaming()

getTimeout

public Long getTimeout()

setTimeout

public void setTimeout(Long timeout)

getOnPrepareRef

public String getOnPrepareRef()

setOnPrepareRef

public void setOnPrepareRef(String onPrepareRef)

getOnPrepare

public Processor getOnPrepare()

setOnPrepare

public void setOnPrepare(Processor onPrepare)

getShareUnitOfWork

public Boolean getShareUnitOfWork()

setShareUnitOfWork

public void setShareUnitOfWork(Boolean shareUnitOfWork)

isShareUnitOfWork

public boolean isShareUnitOfWork()


Apache CAMEL