public class MailboxImpl extends Object implements MailboxService
Constructor and Description |
---|
MailboxImpl(Session session,
String keyspace) |
Modifier and Type | Method and Description |
---|---|
void |
clearMailbox(String recipient)
Deletes all mail for the given recipient.
|
Iterable<MailboxMessage> |
getMessages(String recipient)
Retrieve all messages for a given recipient.
|
void |
init() |
long |
sendMessage(MailboxMessage message)
Stores the given message in the appropriate mailbox.
|
public void init()
public Iterable<MailboxMessage> getMessages(String recipient) throws MailboxException
MailboxService
getMessages
in interface MailboxService
recipient
- User whose mailbox is being read.MailboxException
public long sendMessage(MailboxMessage message) throws MailboxException
MailboxService
sendMessage
in interface MailboxService
message
- Message to send.MailboxException
public void clearMailbox(String recipient) throws MailboxException
MailboxService
clearMailbox
in interface MailboxService
recipient
- User whose mailbox will be cleared.MailboxException
Copyright © 2012–2022. All rights reserved.