Class AggregatorSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
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<AggregatorSpec,AggregatingMessageHandler>
org.springframework.integration.dsl.AggregatorSpec
- All Implemented Interfaces:
Aware,BeanClassLoaderAware,BeanFactoryAware,DisposableBean,FactoryBean<reactor.util.function.Tuple2<ConsumerEndpointFactoryBean,AggregatingMessageHandler>>,InitializingBean,Lifecycle,Phased,SmartLifecycle,ComponentsRegistration
public class AggregatorSpec extends CorrelationHandlerSpec<AggregatorSpec,AggregatingMessageHandler>
- Since:
- 5.0
- Author:
- Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target -
Constructor Summary
Constructors Modifier Constructor Description protectedAggregatorSpec() -
Method Summary
Modifier and Type Method Description AggregatorSpecexpireGroupsUponCompletion(boolean expireGroupsUponCompletion)Map<Object,String>getComponentsToRegister()AggregatorSpecheadersFunction(Function<MessageGroup,Map<String,Object>> headersFunction)Configure aFunctionto merge and compute headers for reply based on the completedMessageGroup.AggregatorSpecoutputExpression(String expression)An expression to determine the output message from the released group.AggregatorSpecoutputProcessor(MessageGroupProcessor outputProcessor)A processor to determine the output message from the released group.AggregatorSpecprocessor(Object target)Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function.AggregatorSpecprocessor(Object target, String methodName)Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function.Methods inherited from class org.springframework.integration.dsl.CorrelationHandlerSpec
correlationExpression, correlationStrategy, correlationStrategy, discardChannel, discardChannel, expireDuration, expireGroupsUponTimeout, expireTimeout, forceReleaseAdvice, groupTimeout, groupTimeout, groupTimeoutExpression, lockRegistry, messageStore, minimumTimeoutForEmptyGroups, popSequence, releaseExpression, releaseLockBeforeSend, releaseStrategy, releaseStrategy, sendPartialResultOnExpiry, setExpireDuration, setExpireTimeout, taskSchedulerMethods inherited from class org.springframework.integration.dsl.ConsumerEndpointSpec
advice, 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.EndpointSpec
assertHandler, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, pollerMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Constructor Details
-
AggregatorSpec
protected AggregatorSpec()
-
-
Method Details
-
processor
Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function. Also set the output processor.- Overrides:
processorin classCorrelationHandlerSpec<AggregatorSpec,AggregatingMessageHandler>- Parameters:
target- the target object.- Returns:
- the handler spec.
- See Also:
AbstractCorrelatingMessageHandler.setCorrelationStrategy(CorrelationStrategy),AbstractCorrelatingMessageHandler.setReleaseStrategy(ReleaseStrategy)
-
processor
Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function. Also set the output processor.- Parameters:
target- the target object.methodName- The method name for the output processor (or 'null' in which case, the target object must have anAggregatorannotation).- Returns:
- the handler spec.
-
outputExpression
An expression to determine the output message from the released group. Defaults to a message with a payload that is a collection of payloads from the input messages.- Parameters:
expression- the expression.- Returns:
- the aggregator spec.
-
outputProcessor
A processor to determine the output message from the released group. Defaults to a message with a payload that is a collection of payloads from the input messages.- Parameters:
outputProcessor- the processor.- Returns:
- the aggregator spec.
-
expireGroupsUponCompletion
- Parameters:
expireGroupsUponCompletion- the expireGroupsUponCompletion.- Returns:
- the aggregator spec.
- See Also:
AggregatingMessageHandler.setExpireGroupsUponCompletion(boolean)
-
headersFunction
Configure aFunctionto merge and compute headers for reply based on the completedMessageGroup.- Parameters:
headersFunction- theFunctionto merge and compute headers for reply based on the completedMessageGroup.- Returns:
- the aggregator spec.
- Since:
- 5.2
-
getComponentsToRegister
- Specified by:
getComponentsToRegisterin interfaceComponentsRegistration- Overrides:
getComponentsToRegisterin classEndpointSpec<AggregatorSpec,ConsumerEndpointFactoryBean,AggregatingMessageHandler>
-