Spring Integration

org.springframework.integration.store
Interface MessageGroup

All Known Implementing Classes:
SimpleMessageGroup

public interface MessageGroup

A group of messages that are correlated with each other and should be processed in the same context.

The message group allows implementations to be mutable, but this behavior is optional. Implementations should take care to document their thread safety and mutability.

Author:
Dave Syer, Oleg Zhurakousky

Method Summary
 boolean canAdd(Message<?> message)
          Query if the message can be added.
 void complete()
           
 java.lang.Object getGroupId()
           
 long getLastModified()
           
 int getLastReleasedMessageSequenceNumber()
          Returns the sequenceNumber of the last released message.
 java.util.Collection<Message<?>> getMessages()
          Returns all available Messages from the group at the time of invocation
 Message<?> getOne()
           
 int getSequenceSize()
           
 long getTimestamp()
           
 boolean isComplete()
           
 int size()
           
 

Method Detail

canAdd

boolean canAdd(Message<?> message)
Query if the message can be added.


getMessages

java.util.Collection<Message<?>> getMessages()
Returns all available Messages from the group at the time of invocation


getGroupId

java.lang.Object getGroupId()
Returns:
the key that links these messages together

getLastReleasedMessageSequenceNumber

int getLastReleasedMessageSequenceNumber()
Returns the sequenceNumber of the last released message. Used in Resequencer use cases only


isComplete

boolean isComplete()
Returns:
true if the group is complete (i.e. no more messages are expected to be added)

complete

void complete()

getSequenceSize

int getSequenceSize()
Returns:
the size of the sequence expected 0 if unknown

size

int size()
Returns:
the total number of messages in this group

getOne

Message<?> getOne()
Returns:
a single message from the group

getTimestamp

long getTimestamp()
Returns:
the timestamp (milliseconds since epoch) associated with the creation of this group

getLastModified

long getLastModified()
Returns:
the timestamp (milliseconds since epoch) associated with the time this group was last updated

Spring Integration