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
adviceChain
Fields inherited from class org.springframework.integration.dsl.EndpointSpec
componentsToRegister, endpointFactoryBean, handler
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexpireGroupsUponCompletion
(boolean expireGroupsUponCompletion) headersFunction
(Function<MessageGroup, Map<String, Object>> headersFunction) Configure aFunction
to 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 withMethodInvokingCorrelationStrategy
andMethodInvokingReleaseStrategy
using the target object which should have methods annotated appropriately for each function.Configure the handler withMethodInvokingCorrelationStrategy
andMethodInvokingReleaseStrategy
using 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, taskScheduler
Methods 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, transactional
Methods inherited from class org.springframework.integration.dsl.EndpointSpec
assertHandler, id, obtainInputChannelFromFlow, obtainInputChannelFromFlow, poller, poller
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, get, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Constructor Details
-
AggregatorSpec
protected AggregatorSpec()
-
-
Method Details
-
processor
Configure the handler withMethodInvokingCorrelationStrategy
andMethodInvokingReleaseStrategy
using the target object which should have methods annotated appropriately for each function. Also set the output processor.- Overrides:
processor
in classCorrelationHandlerSpec<AggregatorSpec,
AggregatingMessageHandler> - Parameters:
target
- the target object.- Returns:
- the handler spec.
- See Also:
-
processor
Configure the handler withMethodInvokingCorrelationStrategy
andMethodInvokingReleaseStrategy
using 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 anAggregator
annotation).- 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 aFunction
to merge and compute headers for reply based on the completedMessageGroup
.- Parameters:
headersFunction
- theFunction
to merge and compute headers for reply based on the completedMessageGroup
.- Returns:
- the aggregator spec.
- Since:
- 5.2
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
- Overrides:
getComponentsToRegister
in classEndpointSpec<AggregatorSpec,
ConsumerEndpointFactoryBean, AggregatingMessageHandler>
-