org.springframework.integration.aggregator
Class DefaultResequencerStrategies

java.lang.Object
  extended by org.springframework.integration.aggregator.DefaultResequencerStrategies
All Implemented Interfaces:
CompletionStrategy, CorrelationStrategy, MessageGroupProcessor

public class DefaultResequencerStrategies
extends java.lang.Object
implements CorrelationStrategy, CompletionStrategy, MessageGroupProcessor

This class implements all the strategy interfaces needed for a default resequencer.

Author:
Iwein Fuld

Constructor Summary
DefaultResequencerStrategies()
           
 
Method Summary
 java.lang.Object getCorrelationKey(Message<?> message)
           
 boolean isComplete(java.util.List<? extends Message<?>> messages)
           
 void processAndSend(MessageGroup group, MessageChannelTemplate channelTemplate, MessageChannel outputChannel)
          Processed the given group and sends the resulting message(s) to the output channel using the channelTemplate.
 void setReleasePartialSequences(boolean releasePartialSequences)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResequencerStrategies

public DefaultResequencerStrategies()
Method Detail

getCorrelationKey

public java.lang.Object getCorrelationKey(Message<?> message)
Specified by:
getCorrelationKey in interface CorrelationStrategy

isComplete

public boolean isComplete(java.util.List<? extends Message<?>> messages)
Specified by:
isComplete in interface CompletionStrategy

processAndSend

public void processAndSend(MessageGroup group,
                           MessageChannelTemplate channelTemplate,
                           MessageChannel outputChannel)
Description copied from interface: MessageGroupProcessor
Processed the given group and sends the resulting message(s) to the output channel using the channelTemplate. Implementations are free to send as little or as many messages based on the invocation as needed. For example the DefaultAggregatingMessageGroupProcessor will send only a single message containing a collection of all messages in the group, where the resequencing equivalent strategy will send all messages in the group individually.

Specified by:
processAndSend in interface MessageGroupProcessor

setReleasePartialSequences

public void setReleasePartialSequences(boolean releasePartialSequences)