org.springframework.integration.store
Interface MessageStore

All Known Implementing Classes:
SimpleMessageStore

public interface MessageStore

Strategy interface for storing and retrieving messages. The interface mimics the semantics for REST for the methods named after REST operations. This is helpful when mapping to a RESTful API.

Since:
2.0
Author:
Mark Fisher, Iwein Fuld

Method Summary
 Message<?> delete(java.lang.Object id)
          Remove the Message with the given id from the MessageStore, if present, and return it.
 Message<?> get(java.lang.Object id)
          Return the Message with the given id, or null if no Message with that id exists in the MessageStore.
 java.util.List<Message<?>> list()
          Return all Messages currently in the MessageStore.
 java.util.List<Message<?>> list(java.lang.Object correlationId)
          Return all Messages currently in the MessageStore that contain the provided correlationId header value.
<T> Message<T>
put(Message<T> message)
          Put the provided Message into the MessageStore.
 

Method Detail

get

Message<?> get(java.lang.Object id)
Return the Message with the given id, or null if no Message with that id exists in the MessageStore.


put

<T> Message<T> put(Message<T> message)
Put the provided Message into the MessageStore. Its id will be used as an index so that the get(Object) and delete(Object) behave properly. If available, its correlationId header will also be stored so that the list(Object) method behaves properly.


delete

Message<?> delete(java.lang.Object id)
Remove the Message with the given id from the MessageStore, if present, and return it. If no Message with that id is present in the store, this will return null.


list

java.util.List<Message<?>> list()
Return all Messages currently in the MessageStore.


list

java.util.List<Message<?>> list(java.lang.Object correlationId)
Return all Messages currently in the MessageStore that contain the provided correlationId header value.

See Also:
MessageHeaders.getCorrelationId()