org.springframework.integration.aggregator
Class AbstractAggregatingMessageGroupProcessor
java.lang.Object
org.springframework.integration.aggregator.AbstractAggregatingMessageGroupProcessor
- All Implemented Interfaces:
- MessageGroupProcessor
- Direct Known Subclasses:
- DefaultAggregatingMessageGroupProcessor, MethodInvokingMessageGroupProcessor
public abstract class AbstractAggregatingMessageGroupProcessor
- extends Object
- implements MessageGroupProcessor
Base class for MessageGroupProcessor implementations that aggregate the group of Messages into a single Message.
- Since:
- 2.0
- Author:
- Iwein Fuld, Alexander Peters, Mark Fisher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAggregatingMessageGroupProcessor
public AbstractAggregatingMessageGroupProcessor()
processAndSend
public final void processAndSend(MessageGroup group,
MessagingTemplate channelTemplate,
MessageChannel outputChannel)
- Description copied from interface:
MessageGroupProcessor
- Process the given group and send the resulting message(s) to the output channel using the messaging template.
Implementations are free to send as little or as many messages based on the invocation as needed. For example an
aggregating processor will send only a single message representing the group, where a resequencing strategy will
send all messages in the group individually.
- Specified by:
processAndSend
in interface MessageGroupProcessor
aggregateHeaders
protected Map<String,Object> aggregateHeaders(MessageGroup group)
- This default implementation simply returns all headers that have no conflicts among the group. An absent header
on one or more Messages within the group is not considered a conflict. Subclasses may override this method with
more advanced conflict-resolution strategies if necessary.
aggregatePayloads
protected abstract Object aggregatePayloads(MessageGroup group)
Copyright © 2010. All Rights Reserved.