public interface Mailbox
Modifier and Type | Method and Description |
---|---|
void |
addMessage(Message msg)
Adds a new message to the mailbox.
|
void |
addMessages(Collection<Message> messages)
Adds newly received or sent messages to the mailbox.
|
void |
checkForMessages()
Triggers a check for new message and updates on existing message.
|
Collection<Message> |
getMessages(MessageQuery query)
Returns a list of messages of the logged-in user based on the given query
criteria.
|
void |
removeMessage(Message msg)
Removes (deletes) a message from the mailbox.
|
void |
updateMessageStatus(Message msg,
MessageStatus newStatus)
Updates the message's status (read/unread), see also
MessageStatus |
Collection<Message> getMessages(MessageQuery query)
query
- - filtering constraints for the list of messages (certain
interval, certain destination etc)void addMessage(Message msg)
void addMessages(Collection<Message> messages)
void removeMessage(Message msg)
msg
- - the message to be deletedvoid updateMessageStatus(Message msg, MessageStatus newStatus)
MessageStatus
msg
- - the message whose status to updatednewStatus
- - the message's new statusvoid checkForMessages()
MessagingService
.