S - the target CorrelationHandlerSpec implementation type.H - the AbstractCorrelatingMessageHandler implementation type.public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,H>,H extends org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler> extends ConsumerEndpointSpec<S,H>
MessageHandlerSpec for an AbstractCorrelatingMessageHandler.componentToRegisterid, logger, PARSER, target| Modifier | Constructor and Description |
|---|---|
protected |
CorrelationHandlerSpec(H messageHandler) |
| Modifier and Type | Method and Description |
|---|---|
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 |
expireGroupsUponTimeout(boolean expireGroupsUponTimeout)
Expire (completely remove) a group if it is completed due to timeout.
|
S |
forceReleaseAdvice(org.aopalliance.aop.Advice... advice)
Configure a list of
Advice objects to be applied to the
forceComplete() operation. |
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 |
lockRegistry(org.springframework.integration.support.locks.LockRegistry lockRegistry)
Used to obtain a
Lock based on the groupId for concurrent operations
on the MessageGroup. |
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) |
advice, autoStartup, order, phase, poller, requiresReply, sendTimeout, transactional, transactional, transactional, transactional, transactionalgetComponentsToRegister, id, poller, poller_this, doGet, get, getId, getObject, getObjectType, isSingletonprotected CorrelationHandlerSpec(H messageHandler)
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(org.springframework.expression.Expression),
ValueExpressionpublic S groupTimeoutExpression(java.lang.String groupTimeoutExpression)
groupTimeoutExpression - the group timeout expression string.AbstractCorrelatingMessageHandler.setGroupTimeoutExpression(org.springframework.expression.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(org.springframework.expression.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)public S expireGroupsUponTimeout(boolean expireGroupsUponTimeout)
true for aggregator and false for resequencer.expireGroupsUponTimeout - the expireGroupsUponTimeout to setAbstractCorrelatingMessageHandler.setExpireGroupsUponTimeout(boolean)public S forceReleaseAdvice(org.aopalliance.aop.Advice... advice)
Advice objects to be applied to the
forceComplete() operation.advice - the advice chain.public S lockRegistry(org.springframework.integration.support.locks.LockRegistry lockRegistry)
Lock based on the groupId for concurrent operations
on the MessageGroup.
By default, an internal DefaultLockRegistry is used.
Use of a distributed LockRegistry, such as the RedisLockRegistry,
ensures only one instance of the aggregator will operate on a group concurrently.lockRegistry - the LockRegistry to use.