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 group is divided into marked and unmarked messages. The marked messages are typically already processed, the unmarked messages are to be processed in the future.

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


Method Summary
 boolean canAdd(Message<?> message)
          Query if the message can be added.
 Object getGroupId()
           
 Collection<Message<?>> getMarked()
           
 Message<?> getOne()
           
 int getSequenceSize()
           
 long getTimestamp()
           
 Collection<Message<?>> getUnmarked()
           
 boolean isComplete()
           
 int size()
           
 

Method Detail

canAdd

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


getUnmarked

Collection<Message<?>> getUnmarked()
Returns:
unmarked messages in the group at time of the invocation

getMarked

Collection<Message<?>> getMarked()
Returns:
marked messages in the group at the time of the invocation

getGroupId

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

isComplete

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

getSequenceSize

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

size

int size()
Returns:
the total number of messages (marked and unmarked) 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

Spring Integration

Copyright © 2010. All Rights Reserved.