org.springframework.integration.message
Class SimpleMessageStore

java.lang.Object
  extended by org.springframework.integration.message.SimpleMessageStore
All Implemented Interfaces:
MessageStore

public class SimpleMessageStore
extends java.lang.Object
implements MessageStore

Map-based implementation of MessageStore that enforces capacity.

Author:
Mark Fisher

Field Summary
private  java.util.Map<java.lang.Object,Message<?>> map
           
 
Constructor Summary
SimpleMessageStore(int capacity)
           
 
Method Summary
 Message<?> get(java.lang.Object key)
           
 java.util.List<Message<?>> list()
           
 Message<?> put(java.lang.Object key, Message<?> message)
           
 Message<?> remove(java.lang.Object key)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

private final java.util.Map<java.lang.Object,Message<?>> map
Constructor Detail

SimpleMessageStore

public SimpleMessageStore(int capacity)
Method Detail

put

public Message<?> put(java.lang.Object key,
                      Message<?> message)
Specified by:
put in interface MessageStore

get

public Message<?> get(java.lang.Object key)
Specified by:
get in interface MessageStore

list

public java.util.List<Message<?>> list()
Specified by:
list in interface MessageStore

remove

public Message<?> remove(java.lang.Object key)
Specified by:
remove in interface MessageStore

size

public int size()
Specified by:
size in interface MessageStore