Class AggregatorSpec
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<AggregatorSpec,AggregatingMessageHandler>
org.springframework.integration.dsl.AggregatorSpec
- All Implemented Interfaces:
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.ConsumerEndpointSpec
adviceChainFields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handlerFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpireGroupsUponCompletion(boolean expireGroupsUponCompletion) headersFunction(Function<MessageGroup, Map<String, Object>> headersFunction) Configure aFunctionto merge and compute headers for reply based on the completedMessageGroup.outputExpression(String expression) An expression to determine the output message from the released group.outputProcessor(MessageGroupProcessor outputProcessor) A processor to determine the output message from the released group.Configure the handler withMethodInvokingCorrelationStrategyandMethodInvokingReleaseStrategyusing the target object which should have methods annotated appropriately for each function.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, groupConditionSupplier, groupTimeout, groupTimeout, groupTimeoutExpression, lockRegistry, messageStore, minimumTimeoutForEmptyGroups, popSequence, releaseExpression, releaseLockBeforeSend, releaseStrategy, releaseStrategy, sendPartialResultOnExpiry, 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, afterPropertiesSet, destroy, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
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:
-
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:
-
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>
-