Spring Integration

org.springframework.integration.aggregator
Class AggregatingMessageHandler

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.handler.AbstractMessageHandler
          extended by org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler
              extended by org.springframework.integration.aggregator.AggregatingMessageHandler
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, NamedComponent, Orderable, MessageHandler, MessageProducer, TrackableComponent

public class AggregatingMessageHandler
extends AbstractCorrelatingMessageHandler

Aggregator specific implementation of AbstractCorrelatingMessageHandler. Will remove MessageGroups only if 'expireGroupsUponCompletion' flag is set to 'true'.

Since:
2.1
Author:
Oleg Zhurakousky

Field Summary
 
Fields inherited from class org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler
DEFAULT_SEND_TIMEOUT, messageStore
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
AggregatingMessageHandler(MessageGroupProcessor processor)
           
AggregatingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store)
           
AggregatingMessageHandler(MessageGroupProcessor processor, MessageGroupStore store, CorrelationStrategy correlationStrategy, ReleaseStrategy releaseStrategy)
           
 
Method Summary
protected  void afterRelease(MessageGroup messageGroup, java.util.Collection<Message<?>> completedMessages)
          Allows you to provide additional logic that needs to be performed after the MessageGroup was released.
 void setExpireGroupsUponCompletion(boolean expireGroupsUponCompletion)
          Will set the 'expireGroupsUponCompletion' flag and if it is set to 'true' it will also remove all 'complete' MessageGroups
 
Methods inherited from class org.springframework.integration.aggregator.AbstractCorrelatingMessageHandler
findLastReleasedSequenceNumber, getComponentType, getMessageStore, handleMessageInternal, onInit, setCorrelationStrategy, setDiscardChannel, setLockRegistry, setMessageStore, setMinimumTimeoutForEmptyGroups, setOutputChannel, setReleasePartialSequences, setReleaseStrategy, setSendPartialResultOnExpiry, setSendTimeout
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, setOrder, setShouldTrack
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.integration.context.NamedComponent
getComponentName
 

Constructor Detail

AggregatingMessageHandler

public AggregatingMessageHandler(MessageGroupProcessor processor,
                                 MessageGroupStore store,
                                 CorrelationStrategy correlationStrategy,
                                 ReleaseStrategy releaseStrategy)

AggregatingMessageHandler

public AggregatingMessageHandler(MessageGroupProcessor processor,
                                 MessageGroupStore store)

AggregatingMessageHandler

public AggregatingMessageHandler(MessageGroupProcessor processor)
Method Detail

setExpireGroupsUponCompletion

public void setExpireGroupsUponCompletion(boolean expireGroupsUponCompletion)
Will set the 'expireGroupsUponCompletion' flag and if it is set to 'true' it will also remove all 'complete' MessageGroups

Parameters:
expireGroupsUponCompletion -

afterRelease

protected void afterRelease(MessageGroup messageGroup,
                            java.util.Collection<Message<?>> completedMessages)
Description copied from class: AbstractCorrelatingMessageHandler
Allows you to provide additional logic that needs to be performed after the MessageGroup was released.

Specified by:
afterRelease in class AbstractCorrelatingMessageHandler

Spring Integration