Class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,H>,H extends AbstractCorrelatingMessageHandler>  
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>>
  
org.springframework.integration.dsl.EndpointSpec<S,ConsumerEndpointFactoryBean,H>
  
org.springframework.integration.dsl.ConsumerEndpointSpec<S,H>
 
org.springframework.integration.dsl.CorrelationHandlerSpec<S,H> 
- Type Parameters:
- S- the target- CorrelationHandlerSpecimplementation type.
- H- the- AbstractCorrelatingMessageHandlerimplementation type.
- All Implemented Interfaces:
- DisposableBean,- FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,,- H>> - InitializingBean,- Lifecycle,- Phased,- SmartLifecycle,- ComponentsRegistration
- Direct Known Subclasses:
- AggregatorSpec,- ResequencerSpec
public abstract class CorrelationHandlerSpec<S extends CorrelationHandlerSpec<S,H>,H extends AbstractCorrelatingMessageHandler>  
extends ConsumerEndpointSpec<S,H> 
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
- 
Field SummaryFields inherited from class org.springframework.integration.dsl.ConsumerEndpointSpecadviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpeccomponentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpeclogger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBeanOBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncorrelationExpression(String correlationExpression) Configure the handler with anExpressionEvaluatingCorrelationStrategyfor the given expression.correlationStrategy(Object target, String methodName) Configure the handler with anMethodInvokingCorrelationStrategyfor the target object and method name.correlationStrategy(CorrelationStrategy correlationStrategy) discardChannel(String discardChannelName) discardChannel(MessageChannel discardChannel) expireDuration(Duration expireDuration) Configure aDurationhow often to run a scheduled purge task.expireGroupsUponTimeout(boolean expireGroupsUponTimeout) Expire (completely remove) a group if it is completed due to timeout.expireTimeout(long expireTimeout) Configure a timeout for old groups in the store to purge.forceReleaseAdvice(Advice... advice) Configure a list ofAdviceobjects to be applied to theforceComplete()operation.groupConditionSupplier(BiFunction<Message<?>, String, String> conditionSupplier) Configure aBiFunctionto supply a group condition from a message to be added to the group.groupTimeout(long groupTimeout) Configure the handler with a group timeout expression that evaluates to this constant value.groupTimeout(Function<MessageGroup, ?> groupTimeoutFunction) Configure the handler with a function that will be invoked to resolve the group timeout, based on the message group.groupTimeoutExpression(String groupTimeoutExpression) Specify a SpEL expression to evaluate the group timeout for scheduled expiration.lockRegistry(LockRegistry lockRegistry) Used to obtain aLockbased on thegroupIdfor concurrent operations on theMessageGroup.messageStore(MessageGroupStore messageStore) minimumTimeoutForEmptyGroups(long minimumTimeoutForEmptyGroups) popSequence(boolean popSequence) Perform aMessageBuilder.popSequenceDetails()for output message or not.Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function.releaseExpression(String releaseExpression) Configure the handler with anExpressionEvaluatingReleaseStrategyfor the given expression.releaseLockBeforeSend(boolean releaseLockBeforeSend) Set to true to release the message group lock before sending any output.releaseStrategy(Object target, String methodName) Configure the handler with anMethodInvokingReleaseStrategyfor the target object and method name.releaseStrategy(ReleaseStrategy releaseStrategy) sendPartialResultOnExpiry(boolean sendPartialResultOnExpiry) taskScheduler(TaskScheduler taskScheduler) Configure aTaskSchedulerfor scheduling tasks, for example in the Polling Consumer.Methods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpecadvice, async, autoStartup, customizeMonoReply, doGet, handleMessageAdvice, notPropagatedHeaders, order, phase, poller, reactive, reactive, requiresReply, role, sendTimeout, transactional, transactional, transactional, transactional, transactionalMethods inherited from class org.springframework.integration.dsl.EndpointSpecassertHandler, getComponentsToRegister, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec_this, afterPropertiesSet, destroy, get, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBeanisSingleton
- 
Constructor Details- 
CorrelationHandlerSpec
 
- 
- 
Method Details- 
messageStore- Parameters:
- messageStore- the message group store.
- Returns:
- the handler spec.
- See Also:
 
- 
sendPartialResultOnExpiry- Parameters:
- sendPartialResultOnExpiry- the sendPartialResultOnExpiry.
- Returns:
- the handler spec.
- See Also:
 
- 
minimumTimeoutForEmptyGroups- Parameters:
- minimumTimeoutForEmptyGroups- the minimumTimeoutForEmptyGroups
- Returns:
- the handler spec.
- See Also:
 
- 
groupTimeoutConfigure the handler with a group timeout expression that evaluates to this constant value.- Parameters:
- groupTimeout- the group timeout in milliseconds.
- Returns:
- the handler spec.
- See Also:
 
- 
groupTimeoutExpressionSpecify a SpEL expression to evaluate the group timeout for scheduled expiration. Must returnDate,LongorStringas a long.- Parameters:
- groupTimeoutExpression- the group timeout expression string.
- Returns:
- the handler spec.
- See Also:
 
- 
groupTimeoutConfigure the handler with a function that will be invoked to resolve the group timeout, based on the message group. Usually used with a JDK8 lambda:.groupTimeout(g -> g.size() * 2000L). Must returnDate,LongorStringa long.- Parameters:
- groupTimeoutFunction- a function invoked to resolve the group timeout in milliseconds.
- Returns:
- the handler spec.
- See Also:
 
- 
taskSchedulerDescription copied from class:ConsumerEndpointSpecConfigure aTaskSchedulerfor scheduling tasks, for example in the Polling Consumer. By default the globalThreadPoolTaskSchedulerbean is used. This configuration is useful when there are requirements to dedicate particular threads for polling task, for example.- Overrides:
- taskSchedulerin class- ConsumerEndpointSpec<S extends CorrelationHandlerSpec<S,- H>, - H extends AbstractCorrelatingMessageHandler> 
- Parameters:
- taskScheduler- the task scheduler.
- Returns:
- the handler spec.
- See Also:
 
- 
discardChannel- Parameters:
- discardChannel- the discard channel.
- Returns:
- the handler spec.
- See Also:
 
- 
discardChannel- Parameters:
- discardChannelName- the discard channel.
- Returns:
- the handler spec.
- See Also:
 
- 
processorConfigure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function.- Parameters:
- target- the target object
- Returns:
- the handler spec.
- See Also:
 
- 
correlationExpressionConfigure the handler with anExpressionEvaluatingCorrelationStrategyfor the given expression.- Parameters:
- correlationExpression- the correlation expression.
- Returns:
- the handler spec.
- See Also:
 
- 
correlationStrategyConfigure the handler with anMethodInvokingCorrelationStrategyfor the target object and method name.- Parameters:
- target- the target object.
- methodName- the method name.
- Returns:
- the handler spec.
- See Also:
 
- 
correlationStrategy- Parameters:
- correlationStrategy- the correlation strategy.
- Returns:
- the handler spec.
- See Also:
 
- 
releaseExpressionConfigure the handler with anExpressionEvaluatingReleaseStrategyfor the given expression.- Parameters:
- releaseExpression- the correlation expression.
- Returns:
- the handler spec.
- See Also:
 
- 
releaseStrategyConfigure the handler with anMethodInvokingReleaseStrategyfor the target object and method name.- Parameters:
- target- the target object.
- methodName- the method name.
- Returns:
- the handler spec.
- See Also:
 
- 
releaseStrategy- Parameters:
- releaseStrategy- the release strategy.
- Returns:
- the handler spec.
- See Also:
 
- 
expireGroupsUponTimeoutExpire (completely remove) a group if it is completed due to timeout. Defaulttruefor aggregator andfalsefor resequencer.- Parameters:
- expireGroupsUponTimeout- the expireGroupsUponTimeout to set
- Returns:
- the handler spec.
- See Also:
 
- 
forceReleaseAdviceConfigure a list ofAdviceobjects to be applied to theforceComplete()operation.- Parameters:
- advice- the advice chain.
- Returns:
- the endpoint spec.
 
- 
lockRegistryUsed to obtain aLockbased on thegroupIdfor concurrent operations on theMessageGroup. By default, an internalDefaultLockRegistryis used. Use of a distributedLockRegistry, such as theRedisLockRegistry, ensures only one instance of the aggregator will operate on a group concurrently.- Parameters:
- lockRegistry- the- LockRegistryto use.
- Returns:
- the endpoint spec.
 
- 
popSequencePerform aMessageBuilder.popSequenceDetails()for output message or not.- Parameters:
- popSequence- the boolean flag to use.
- Returns:
- the endpoint spec.
- Since:
- 5.1
- See Also:
 
- 
expireTimeoutConfigure a timeout for old groups in the store to purge.- Parameters:
- expireTimeout- the timeout in milliseconds to use.
- Returns:
- the endpoint spec.
- Since:
- 5.5
- See Also:
 
- 
expireDurationConfigure aDurationhow often to run a scheduled purge task.- Parameters:
- expireDuration- the duration for scheduled purge task.
- Returns:
- the endpoint spec.
- Since:
- 5.5
- See Also:
 
- 
releaseLockBeforeSendSet to true to release the message group lock before sending any output. See "Avoiding Deadlocks" in the Aggregator section of the reference manual for more information as to why this might be needed.- Parameters:
- releaseLockBeforeSend- true to release the lock.
- Returns:
- the endpoint spec.
- Since:
- 5.5
- See Also:
 
- 
groupConditionSupplierConfigure aBiFunctionto supply a group condition from a message to be added to the group. Thenullresult from the function will reset a condition set before.- Parameters:
- conditionSupplier- the function to supply a group condition from a message to be added to the group.
- Returns:
- the endpoint spec.
- Since:
- 5.5
 
 
-