public class AggregateCounterHandler
extends java.lang.Object
aggregate-counter
module, resolves SpEL expressions
as needed and delegate the heavy lifting to an AggregateCounterRepository
.Modifier and Type | Field and Description |
---|---|
protected org.springframework.expression.EvaluationContext |
evaluationContext |
protected org.springframework.expression.Expression |
nameExpression |
protected org.springframework.expression.spel.standard.SpelExpressionParser |
spelExpressionParser |
Constructor and Description |
---|
AggregateCounterHandler(AggregateCounterRepository aggregateCounterRepository,
java.lang.String nameExpression,
java.lang.String incrementExpression) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
computeMetricName(org.springframework.messaging.Message<?> message) |
org.springframework.messaging.Message<?> |
process(org.springframework.messaging.Message<?> message,
java.lang.String timeField) |
void |
setDateFormat(java.lang.String pattern) |
void |
setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext) |
protected final org.springframework.expression.Expression nameExpression
protected final org.springframework.expression.spel.standard.SpelExpressionParser spelExpressionParser
protected org.springframework.expression.EvaluationContext evaluationContext
public AggregateCounterHandler(AggregateCounterRepository aggregateCounterRepository, java.lang.String nameExpression, java.lang.String incrementExpression)
public void setDateFormat(java.lang.String pattern)
public org.springframework.messaging.Message<?> process(org.springframework.messaging.Message<?> message, java.lang.String timeField) throws java.text.ParseException
java.text.ParseException
protected java.lang.String computeMetricName(org.springframework.messaging.Message<?> message)
public void setIntegrationEvaluationContext(org.springframework.expression.EvaluationContext evaluationContext)
setIntegrationEvaluationContext
in interface org.springframework.integration.expression.IntegrationEvaluationContextAware