Spring Integration

org.springframework.integration.aggregator
Class ResequencingMessageGroupProcessor

java.lang.Object
  extended by org.springframework.integration.aggregator.ResequencingMessageGroupProcessor
All Implemented Interfaces:
MessageGroupProcessor

public class ResequencingMessageGroupProcessor
extends Object
implements MessageGroupProcessor

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

Since:
2.0
Author:
Iwein Fuld, Dave Syer

Constructor Summary
ResequencingMessageGroupProcessor()
           
 
Method Summary
 Object processMessageGroup(MessageGroup group)
          Process the given MessageGroup.
 void setComparator(Comparator<Message<?>> comparator)
          A comparator to use to order messages before processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResequencingMessageGroupProcessor

public ResequencingMessageGroupProcessor()
Method Detail

setComparator

public void setComparator(Comparator<Message<?>> comparator)
A comparator to use to order messages before processing. The default is to order by sequence number.

Parameters:
comparator - the comparator to use to order messages

processMessageGroup

public Object processMessageGroup(MessageGroup group)
Description copied from interface: MessageGroupProcessor
Process the given MessageGroup. Implementations are free to return as few or as many messages based on the invocation as needed. For example an aggregating processor will return only a single message representing the group, while a resequencing processor will return all messages whose preceding sequence has been satisfied.

Specified by:
processMessageGroup in interface MessageGroupProcessor

Spring Integration

Copyright © 2010. All Rights Reserved.