public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,H>,H extends org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler> extends MessageHandlerSpec<S,H>
MessageHandlerSpec for an AbstractCorrelatingMessageHandler.| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.integration.store.MessageGroupStore |
messageStore |
protected boolean |
sendPartialResultOnExpiry |
id, logger, PARSER, target| Modifier and Type | Method and Description |
|---|---|
protected H |
configure(H handler) |
S |
correlationExpression(java.lang.String correlationExpression)
Configure the handler with an
ExpressionEvaluatingCorrelationStrategy for the
given expression. |
S |
correlationStrategy(org.springframework.integration.aggregator.CorrelationStrategy correlationStrategy) |
S |
correlationStrategy(java.lang.Object target,
java.lang.String methodName)
Configure the handler with an
MethodInvokingCorrelationStrategy
for the target object and method name. |
S |
discardChannel(org.springframework.messaging.MessageChannel discardChannel) |
S |
discardChannel(java.lang.String discardChannelName) |
S |
groupTimeout(Function<org.springframework.integration.store.MessageGroup,java.lang.Long> groupTimeoutFunction)
Configure the handler with a function that will be invoked to resolve the group timeout,
based on the message group.
|
S |
groupTimeout(long groupTimeout)
Configure the handler with a group timeout expression that evaluates to
this constant value.
|
S |
groupTimeoutExpression(java.lang.String groupTimeoutExpression) |
S |
messageStore(org.springframework.integration.store.MessageGroupStore messageStore) |
S |
minimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups) |
S |
processor(java.lang.Object target)
Configure the handler with
MethodInvokingCorrelationStrategy
and MethodInvokingReleaseStrategy using the target
object which should have methods annotated appropriately for each function. |
S |
releaseExpression(java.lang.String releaseExpression)
Configure the handler with an
ExpressionEvaluatingReleaseStrategy for the
given expression. |
S |
releaseStrategy(java.lang.Object target,
java.lang.String methodName)
Configure the handler with an
MethodInvokingReleaseStrategy
for the target object and method name. |
S |
releaseStrategy(org.springframework.integration.aggregator.ReleaseStrategy releaseStrategy) |
S |
sendPartialResultOnExpiry(boolean sendPartialResultOnExpiry) |
S |
taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler) |
protected org.springframework.integration.store.MessageGroupStore messageStore
protected boolean sendPartialResultOnExpiry
public S messageStore(org.springframework.integration.store.MessageGroupStore messageStore)
messageStore - the message group store.AbstractCorrelatingMessageHandler.setMessageStore(MessageGroupStore)public S sendPartialResultOnExpiry(boolean sendPartialResultOnExpiry)
sendPartialResultOnExpiry - the sendPartialResultOnExpiry.AbstractCorrelatingMessageHandler.setSendPartialResultOnExpiry(boolean)public S minimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups)
minimumTimeoutForEmptyGroups - the minimumTimeoutForEmptyGroupsAbstractCorrelatingMessageHandler.setMinimumTimeoutForEmptyGroups(long)public S groupTimeout(long groupTimeout)
groupTimeout - the group timeout in milliseconds.AbstractCorrelatingMessageHandler.setGroupTimeoutExpression(Expression),
ValueExpressionpublic S groupTimeoutExpression(java.lang.String groupTimeoutExpression)
groupTimeoutExpression - the group timeout expression string.AbstractCorrelatingMessageHandler.setGroupTimeoutExpression(Expression)public S groupTimeout(Function<org.springframework.integration.store.MessageGroup,java.lang.Long> groupTimeoutFunction)
.groupTimeout(g -> g.size() * 2000L).
groupTimeoutFunction - a function invoked to resolve the group timeout in milliseconds.AbstractCorrelatingMessageHandler.setGroupTimeoutExpression(Expression)public S taskScheduler(org.springframework.scheduling.TaskScheduler taskScheduler)
taskScheduler - the task scheduler.AbstractCorrelatingMessageHandler.setTaskScheduler(TaskScheduler)public S discardChannel(org.springframework.messaging.MessageChannel discardChannel)
discardChannel - the discard channel.AbstractCorrelatingMessageHandler.setDiscardChannel(MessageChannel)public S discardChannel(java.lang.String discardChannelName)
discardChannelName - the discard channel.AbstractCorrelatingMessageHandler.setDiscardChannelName(String)public S processor(java.lang.Object target)
MethodInvokingCorrelationStrategy
and MethodInvokingReleaseStrategy using the target
object which should have methods annotated appropriately for each function.target - the target object,AbstractCorrelatingMessageHandler.setCorrelationStrategy(CorrelationStrategy),
AbstractCorrelatingMessageHandler.setReleaseStrategy(ReleaseStrategy)public S correlationExpression(java.lang.String correlationExpression)
ExpressionEvaluatingCorrelationStrategy for the
given expression.correlationExpression - the correlation expression.AbstractCorrelatingMessageHandler.setCorrelationStrategy(CorrelationStrategy)public S correlationStrategy(java.lang.Object target, java.lang.String methodName)
MethodInvokingCorrelationStrategy
for the target object and method name.target - the target object.methodName - the method name.AbstractCorrelatingMessageHandler.setCorrelationStrategy(CorrelationStrategy)public S correlationStrategy(org.springframework.integration.aggregator.CorrelationStrategy correlationStrategy)
correlationStrategy - the correlation strategy.AbstractCorrelatingMessageHandler.setCorrelationStrategy(CorrelationStrategy)public S releaseExpression(java.lang.String releaseExpression)
ExpressionEvaluatingReleaseStrategy for the
given expression.releaseExpression - the correlation expression.AbstractCorrelatingMessageHandler.setReleaseStrategy(ReleaseStrategy)public S releaseStrategy(java.lang.Object target, java.lang.String methodName)
MethodInvokingReleaseStrategy
for the target object and method name.target - the target object.methodName - the method name.AbstractCorrelatingMessageHandler.setReleaseStrategy(ReleaseStrategy)public S releaseStrategy(org.springframework.integration.aggregator.ReleaseStrategy releaseStrategy)
releaseStrategy - the release strategy.AbstractCorrelatingMessageHandler.setReleaseStrategy(ReleaseStrategy)