public interface MessageStore
Modifier and Type | Method and Description |
---|---|
<T> Message<T> |
addMessage(Message<T> message)
Put the provided Message into the MessageStore.
|
Message<?> |
getMessage(UUID id) |
long |
getMessageCount()
Optional attribute giving the number of messages in the store.
|
MessageMetadata |
getMessageMetadata(UUID id)
|
Message<?> |
removeMessage(UUID id)
Remove the Message with the given id from the MessageStore, if present, and return it.
|
Message<?> getMessage(UUID id)
id
- The message identifier.MessageMetadata getMessageMetadata(UUID id)
id
- The message identifier.<T> Message<T> addMessage(Message<T> message)
getMessage(UUID)
and removeMessage(UUID)
behave properly. Since messages are
immutable, putting the same message more than once is a no-op.T
- The payload type.message
- The message.Message<?> removeMessage(UUID id)
id
- THe message identifier.@ManagedAttribute long getMessageCount()
UnsupportedOperationException
- if not implemented