|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.OptionalIdentifiedDefinition org.apache.camel.model.ProcessorDefinition<AggregateDefinition> org.apache.camel.model.AggregateDefinition
public class AggregateDefinition
Represents an XML <aggregate/> element
Field Summary |
---|
Fields inherited from class org.apache.camel.model.ProcessorDefinition |
---|
errorHandlerBuilder, errorHandlerRef, inheritErrorHandler, log |
Constructor Summary | |
---|---|
AggregateDefinition()
|
|
AggregateDefinition(Expression correlationExpression)
|
|
AggregateDefinition(Expression correlationExpression,
AggregationStrategy aggregationStrategy)
|
|
AggregateDefinition(ExpressionDefinition correlationExpression)
|
|
AggregateDefinition(Predicate predicate)
|
Method Summary | |
---|---|
AggregateDefinition |
aggregationRepository(AggregationRepository aggregationRepository)
Sets the custom aggregate repository to use. |
AggregateDefinition |
aggregationRepositoryRef(String aggregationRepositoryRef)
Sets the custom aggregate repository to use Will by default use MemoryAggregationRepository |
AggregateDefinition |
aggregationStrategy(AggregationStrategy aggregationStrategy)
Sets the aggregate strategy to use |
AggregateDefinition |
aggregationStrategyRef(String aggregationStrategyRef)
Sets the aggregate strategy to use |
protected void |
checkNoCompletedPredicate()
|
AggregateDefinition |
closeCorrelationKeyOnCompletion(int capacity)
Closes a correlation key when its complete. |
AggregateDefinition |
completionFromBatchConsumer()
Enables the batch completion mode where we aggregate from a BatchConsumer
and aggregate the total number of exchanges the BatchConsumer has reported
as total by checking the exchange property Exchange.BATCH_COMPLETE when its complete. |
AggregateDefinition |
completionInterval(long completionInterval)
Sets the completion interval, which would cause the aggregate to consider the group as complete and send out the aggregated exchange. |
ExpressionClause<AggregateDefinition> |
completionPredicate()
Sets the predicate used to determine if the aggregation is completed |
AggregateDefinition |
completionPredicate(Predicate predicate)
Sets the predicate used to determine if the aggregation is completed |
AggregateDefinition |
completionSize(Expression completionSize)
Sets the completion size, which is the number of aggregated exchanges which would cause the aggregate to consider the group as complete and send out the aggregated exchange. |
AggregateDefinition |
completionSize(int completionSize)
Sets the completion size, which is the number of aggregated exchanges which would cause the aggregate to consider the group as complete and send out the aggregated exchange. |
AggregateDefinition |
completionTimeout(Expression completionTimeout)
Sets the completion timeout, which would cause the aggregate to consider the group as complete and send out the aggregated exchange. |
AggregateDefinition |
completionTimeout(long completionTimeout)
Sets the completion timeout, which would cause the aggregate to consider the group as complete and send out the aggregated exchange. |
protected AggregateProcessor |
createAggregator(RouteContext routeContext)
|
ExpressionClause<AggregateDefinition> |
createAndSetExpression()
|
Processor |
createProcessor(RouteContext routeContext)
Override this in definition class and implement logic to create the processor based on the definition model. |
AggregateDefinition |
discardOnCompletionTimeout()
Discards the aggregated message on completion timeout. |
AggregateDefinition |
eagerCheckCompletion()
Use eager completion checking which means that the {{completionPredicate}} will use the incoming Exchange. |
AggregateDefinition |
executorService(ExecutorService executorService)
Setting the executor service for executing |
AggregateDefinition |
executorServiceRef(String executorServiceRef)
Setting the executor service for executing |
AggregationRepository |
getAggregationRepository()
|
String |
getAggregationRepositoryRef()
|
AggregationStrategy |
getAggregationStrategy()
|
String |
getAggregationStrategyRef()
|
Integer |
getCloseCorrelationKeyOnCompletion()
|
Boolean |
getCompletionFromBatchConsumer()
|
Long |
getCompletionInterval()
|
ExpressionSubElementDefinition |
getCompletionPredicate()
|
Integer |
getCompletionSize()
|
ExpressionSubElementDefinition |
getCompletionSizeExpression()
|
Long |
getCompletionTimeout()
|
ExpressionSubElementDefinition |
getCompletionTimeoutExpression()
|
ExpressionSubElementDefinition |
getCorrelationExpression()
|
Boolean |
getDiscardOnCompletionTimeout()
|
Boolean |
getEagerCheckCompletion()
|
ExecutorService |
getExecutorService()
Gets the executor service |
String |
getExecutorServiceRef()
Gets the reference to lookup in the Registry for the executor service to be used. |
ExpressionDefinition |
getExpression()
|
Boolean |
getGroupExchanges()
|
Boolean |
getIgnoreInvalidCorrelationKeys()
|
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node |
List<ProcessorDefinition> |
getOutputs()
|
Boolean |
getParallelProcessing()
|
String |
getShortName()
Returns a short name for this node which can be useful for ID generation or referring to related resources like images |
String |
getStrategyRef()
|
AggregateDefinition |
groupExchanges()
Enables grouped exchanges, so the aggregator will group all aggregated exchanges into a single combined Exchange holding all the aggregated exchanges in a List as a exchange
property with the key Exchange.GROUPED_EXCHANGE . |
AggregateDefinition |
ignoreInvalidCorrelationKeys()
If a correlation key cannot be successfully evaluated it will be ignored by logging a {{DEBUG}} and then just ignore the incoming Exchange. |
boolean |
isCompletionFromBatchConsumer()
|
boolean |
isDiscardOnCompletionTimeout()
|
boolean |
isEagerCheckCompletion()
|
boolean |
isGroupExchanges()
|
boolean |
isIgnoreInvalidCorrelationKeys()
|
boolean |
isOutputSupported()
|
boolean |
isParallelProcessing()
|
AggregateDefinition |
parallelProcessing()
Sending the aggregated output in parallel |
void |
setAggregationRepository(AggregationRepository aggregationRepository)
|
void |
setAggregationRepositoryRef(String aggregationRepositoryRef)
|
void |
setAggregationStrategy(AggregationStrategy aggregationStrategy)
|
void |
setAggregationStrategyRef(String aggregationStrategyRef)
|
void |
setCloseCorrelationKeyOnCompletion(Integer closeCorrelationKeyOnCompletion)
|
void |
setCompletionFromBatchConsumer(Boolean completionFromBatchConsumer)
|
void |
setCompletionInterval(Long completionInterval)
|
void |
setCompletionPredicate(ExpressionSubElementDefinition completionPredicate)
|
void |
setCompletionSize(Integer completionSize)
|
void |
setCompletionSizeExpression(ExpressionSubElementDefinition completionSizeExpression)
|
void |
setCompletionTimeout(Long completionTimeout)
|
void |
setCompletionTimeoutExpression(ExpressionSubElementDefinition completionTimeoutExpression)
|
void |
setCorrelationExpression(ExpressionSubElementDefinition correlationExpression)
|
void |
setDiscardOnCompletionTimeout(Boolean discardOnCompletionTimeout)
|
void |
setEagerCheckCompletion(Boolean eagerCheckCompletion)
|
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)
|
void |
setGroupExchanges(Boolean groupExchanges)
|
void |
setIgnoreInvalidCorrelationKeys(Boolean ignoreInvalidCorrelationKeys)
|
void |
setOutputs(List<ProcessorDefinition> outputs)
|
void |
setParallelProcessing(boolean parallelProcessing)
|
void |
setStrategyRef(String strategyRef)
|
String |
toString()
|
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 AggregateDefinition()
public AggregateDefinition(Predicate predicate)
public AggregateDefinition(Expression correlationExpression)
public AggregateDefinition(ExpressionDefinition correlationExpression)
public AggregateDefinition(Expression correlationExpression, AggregationStrategy aggregationStrategy)
Method Detail |
---|
public String toString()
toString
in class Object
public String getShortName()
OptionalIdentifiedDefinition
getShortName
in class OptionalIdentifiedDefinition
public String getLabel()
ProcessorDefinition
getLabel
in class ProcessorDefinition<AggregateDefinition>
public Processor createProcessor(RouteContext routeContext) throws Exception
ProcessorDefinition
createProcessor
in class ProcessorDefinition<AggregateDefinition>
Exception
public ExpressionClause<AggregateDefinition> createAndSetExpression()
protected AggregateProcessor createAggregator(RouteContext routeContext) throws Exception
Exception
public AggregationStrategy getAggregationStrategy()
public void setAggregationStrategy(AggregationStrategy aggregationStrategy)
public String getAggregationStrategyRef()
public void setAggregationStrategyRef(String aggregationStrategyRef)
public Integer getCompletionSize()
public void setCompletionSize(Integer completionSize)
public Long getCompletionInterval()
public void setCompletionInterval(Long completionInterval)
public Long getCompletionTimeout()
public void setCompletionTimeout(Long completionTimeout)
public ExpressionSubElementDefinition getCompletionPredicate()
public void setCompletionPredicate(ExpressionSubElementDefinition completionPredicate)
public ExpressionSubElementDefinition getCompletionTimeoutExpression()
public void setCompletionTimeoutExpression(ExpressionSubElementDefinition completionTimeoutExpression)
public ExpressionSubElementDefinition getCompletionSizeExpression()
public void setCompletionSizeExpression(ExpressionSubElementDefinition completionSizeExpression)
public Boolean getGroupExchanges()
public boolean isGroupExchanges()
public void setGroupExchanges(Boolean groupExchanges)
public Boolean getCompletionFromBatchConsumer()
public boolean isCompletionFromBatchConsumer()
public void setCompletionFromBatchConsumer(Boolean completionFromBatchConsumer)
public ExecutorService getExecutorService()
ExecutorServiceAware
getExecutorService
in interface ExecutorServiceAware
public void setExecutorService(ExecutorService executorService)
ExecutorServiceAware
setExecutorService
in interface ExecutorServiceAware
executorService
- the executorpublic Boolean getParallelProcessing()
public boolean isParallelProcessing()
public void setParallelProcessing(boolean parallelProcessing)
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 String getStrategyRef()
public void setStrategyRef(String strategyRef)
public Boolean getEagerCheckCompletion()
public boolean isEagerCheckCompletion()
public void setEagerCheckCompletion(Boolean eagerCheckCompletion)
public Boolean getIgnoreInvalidCorrelationKeys()
public boolean isIgnoreInvalidCorrelationKeys()
public void setIgnoreInvalidCorrelationKeys(Boolean ignoreInvalidCorrelationKeys)
public Integer getCloseCorrelationKeyOnCompletion()
public void setCloseCorrelationKeyOnCompletion(Integer closeCorrelationKeyOnCompletion)
public AggregationRepository getAggregationRepository()
public void setAggregationRepository(AggregationRepository aggregationRepository)
public String getAggregationRepositoryRef()
public void setAggregationRepositoryRef(String aggregationRepositoryRef)
public Boolean getDiscardOnCompletionTimeout()
public boolean isDiscardOnCompletionTimeout()
public void setDiscardOnCompletionTimeout(Boolean discardOnCompletionTimeout)
public AggregateDefinition eagerCheckCompletion()
public AggregateDefinition ignoreInvalidCorrelationKeys()
public AggregateDefinition closeCorrelationKeyOnCompletion(int capacity)
ClosedCorrelationKeyException
is thrown.
capacity
- the maximum capacity of the closed correlation key cache.
Use 0 or negative value for unbounded capacity.
public AggregateDefinition discardOnCompletionTimeout()
public AggregateDefinition completionFromBatchConsumer()
BatchConsumer
and aggregate the total number of exchanges the BatchConsumer
has reported
as total by checking the exchange property Exchange.BATCH_COMPLETE
when its complete.
public AggregateDefinition completionSize(int completionSize)
completionSize
- the completion size
public AggregateDefinition completionSize(Expression completionSize)
completionSize
- the completion size as an Expression
which is evaluated as a Integer
type
public AggregateDefinition completionInterval(long completionInterval)
completionInterval
- the interval in millis
public AggregateDefinition completionTimeout(long completionTimeout)
completionTimeout
- the timeout in millis
public AggregateDefinition completionTimeout(Expression completionTimeout)
completionTimeout
- the timeout as an Expression
which is evaluated as a Long
type
public AggregateDefinition aggregationStrategy(AggregationStrategy aggregationStrategy)
aggregationStrategy
- the aggregate strategy to use
public AggregateDefinition aggregationStrategyRef(String aggregationStrategyRef)
aggregationStrategyRef
- reference to the strategy to lookup in the registry
public AggregateDefinition aggregationRepository(AggregationRepository aggregationRepository)
MemoryAggregationRepository
aggregationRepository
- the aggregate repository to use
public AggregateDefinition aggregationRepositoryRef(String aggregationRepositoryRef)
MemoryAggregationRepository
aggregationRepositoryRef
- reference to the repository to lookup in the registry
public AggregateDefinition groupExchanges()
List
as a exchange
property with the key Exchange.GROUPED_EXCHANGE
.
public ExpressionClause<AggregateDefinition> completionPredicate()
public AggregateDefinition completionPredicate(Predicate predicate)
predicate
- the predicate
public AggregateDefinition parallelProcessing()
public AggregateDefinition executorService(ExecutorService executorService)
ExecutorServiceAwareDefinition
executorService
in interface ExecutorServiceAwareDefinition<AggregateDefinition>
executorService
- the executor service
public AggregateDefinition executorServiceRef(String executorServiceRef)
ExecutorServiceAwareDefinition
executorServiceRef
in interface ExecutorServiceAwareDefinition<AggregateDefinition>
executorServiceRef
- reference for a ExecutorService
to lookup in the Registry
protected void checkNoCompletedPredicate()
public void setCorrelationExpression(ExpressionSubElementDefinition correlationExpression)
public ExpressionSubElementDefinition getCorrelationExpression()
public ExpressionDefinition getExpression()
public void setExpression(ExpressionDefinition expression)
public List<ProcessorDefinition> getOutputs()
getOutputs
in class ProcessorDefinition<AggregateDefinition>
public boolean isOutputSupported()
isOutputSupported
in class ProcessorDefinition<AggregateDefinition>
public void setOutputs(List<ProcessorDefinition> outputs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |