|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.aggregator.MessageBarrier<T>
public class MessageBarrier<T extends java.util.Collection<? extends Message<?>>>
Utility class for AbstractMessageBarrierHandler and its subclasses for
storing objects while in transit. It is a wrapper around a Collection
,
providing special properties for recording the complete status, the creation
time (for determining if a group of messages has timed out), and the
correlation id for a group of messages (available after the first message has
been added to it). This is a parameterized type, allowing different different
client classes to use different types of Collections and their respective features.
Can store/retrieve attributes through its setAttribute() and getAttribute() methods.
This class is not thread-safe and will be synchronized by the calling code.
Field Summary | |
---|---|
protected T |
messages
|
Constructor Summary | |
---|---|
MessageBarrier(T messages,
java.lang.Object correlationKey)
|
Method Summary | ||
---|---|---|
|
getAttribute(java.lang.String attributeName)
Gets the value of a given attribute from the MessageBarrier. |
|
java.lang.Object |
getCorrelationKey()
|
|
T |
getMessages()
|
|
long |
getTimestamp()
Returns the creation time of this barrier as the number of milliseconds since January 1, 1970. |
|
boolean |
isComplete()
True if the barrier has received all the messages and can proceed to release them. |
|
void |
setAttribute(java.lang.String attributeName,
java.lang.Object value)
Sets a the value of a given attribute on the MessageBarrier. |
|
void |
setComplete()
Marks the barrier as complete. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final T extends java.util.Collection<? extends Message<?>> messages
Constructor Detail |
---|
public MessageBarrier(T messages, java.lang.Object correlationKey)
Method Detail |
---|
public java.lang.Object getCorrelationKey()
public long getTimestamp()
System.currentTimeMillis()
public void setComplete()
public boolean isComplete()
public T getMessages()
public void setAttribute(java.lang.String attributeName, java.lang.Object value)
attributeName
- value
- public <V> V getAttribute(java.lang.String attributeName)
attributeName
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |