use of org.springframework.integration.aggregator.MessageGroupProcessor in project spring-integration by spring-projects.
the class AggregatorFactoryBean method createHandler.
@Override
protected AggregatingMessageHandler createHandler() {
MessageGroupProcessor outputProcessor;
if (this.processorBean instanceof MessageGroupProcessor) {
outputProcessor = (MessageGroupProcessor) this.processorBean;
} else {
if (!StringUtils.hasText(this.methodName)) {
outputProcessor = new MethodInvokingMessageGroupProcessor(this.processorBean);
} else {
outputProcessor = new MethodInvokingMessageGroupProcessor(this.processorBean, this.methodName);
}
}
AggregatingMessageHandler aggregator = new AggregatingMessageHandler(outputProcessor);
if (this.expireGroupsUponCompletion != null) {
aggregator.setExpireGroupsUponCompletion(this.expireGroupsUponCompletion);
}
if (this.sendTimeout != null) {
aggregator.setSendTimeout(this.sendTimeout);
}
if (this.outputChannelName != null) {
aggregator.setOutputChannelName(this.outputChannelName);
}
if (this.metrics != null) {
aggregator.configureMetrics(this.metrics);
}
if (this.statsEnabled != null) {
aggregator.setStatsEnabled(this.statsEnabled);
}
if (this.countsEnabled != null) {
aggregator.setCountsEnabled(this.countsEnabled);
}
if (this.lockRegistry != null) {
aggregator.setLockRegistry(this.lockRegistry);
}
if (this.messageStore != null) {
aggregator.setMessageStore(this.messageStore);
}
if (this.correlationStrategy != null) {
aggregator.setCorrelationStrategy(this.correlationStrategy);
}
if (this.releaseStrategy != null) {
aggregator.setReleaseStrategy(this.releaseStrategy);
}
if (this.groupTimeoutExpression != null) {
aggregator.setGroupTimeoutExpression(this.groupTimeoutExpression);
}
if (this.forceReleaseAdviceChain != null) {
aggregator.setForceReleaseAdviceChain(this.forceReleaseAdviceChain);
}
if (this.taskScheduler != null) {
aggregator.setTaskScheduler(this.taskScheduler);
}
if (this.discardChannel != null) {
aggregator.setDiscardChannel(this.discardChannel);
}
if (this.discardChannelName != null) {
aggregator.setDiscardChannelName(this.discardChannelName);
}
if (this.sendPartialResultOnExpiry != null) {
aggregator.setSendPartialResultOnExpiry(this.sendPartialResultOnExpiry);
}
if (this.minimumTimeoutForEmptyGroups != null) {
aggregator.setMinimumTimeoutForEmptyGroups(this.minimumTimeoutForEmptyGroups);
}
if (this.expireGroupsUponTimeout != null) {
aggregator.setExpireGroupsUponTimeout(this.expireGroupsUponTimeout);
}
return aggregator;
}
Aggregations