org.springframework.integration.aggregator
Class MessageGroup
java.lang.Object
org.springframework.integration.aggregator.MessageGroup
public class MessageGroup
- extends java.lang.Object
Represents an mutable group of correlated messages that is bound to a certain MessageStore
and correlation key. The group will grow during its lifetime, when messages are added to it.
This is not thread safe and should not be used for long running aggregations.
According to its CompletionStrategy it can be complete
depending on the messages in the group.
Optionally MessageGroupListeners can be added to get callbacks when (parts of) the group are processed or the whole
group is completed.
- Author:
- Iwein Fuld, Oleg Zhurakousky
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageGroup
public MessageGroup(java.util.Collection<? extends Message<?>> originalMessages,
CompletionStrategy completionStrategy,
java.lang.Object correlationKey,
MessageGroupListener... listeners)
hasNoMessageSuperseding
public boolean hasNoMessageSuperseding(Message<?> message)
add
public void add(Message<?> message)
isComplete
public boolean isComplete()
getMessages
public java.util.List<Message<?>> getMessages()
getCorrelationKey
public java.lang.Object getCorrelationKey()
onProcessingOf
public void onProcessingOf(Message... messages)
onCompletion
public void onCompletion()