|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable rice.post.PostClient rice.email.EmailService
public class EmailService
This class serves as the entry point into the email service written on top of
Post.
The EmailService uses the observer pattern to notify other objects of newly
received emails. The event generated will contain an Email
object as
its argument.
Field Summary | |
---|---|
static java.lang.String |
INBOX_NAME
the name of the Inbox's log |
protected Logger |
logger
|
Constructor Summary | |
---|---|
EmailService(java.net.InetAddress localHost,
Post post,
java.security.KeyPair keyPair,
boolean logRewrite)
Constructor |
Method Summary | |
---|---|
void |
addSubscription(java.lang.String sub,
Continuation command)
Adds a subscriptions to the log |
void |
expand(PostUserAddress[] list,
SmtpManager manager,
Continuation command)
Method which expands the given list of PostUserAddresses by recursively checking for forwarding lists |
void |
getContentHashReferences(Continuation command)
This method is periodically invoked by Post in order to get a list of all handles under which the application has live objects. |
java.net.InetAddress |
getLocalHost()
|
void |
getLogs(Continuation command)
This method is periodically invoked by Post in order to get a list of all mutable data which the application is interested in. |
Post |
getPost()
|
void |
getRootFolder(Continuation command)
Returns the Log for ePost's root folder. |
void |
getSubscriptions(Continuation command)
Returns the list of subscriptions in the log |
void |
notificationReceived(NotificationMessage nm,
Continuation command)
This method is how the Post layer informs the EmailService layer that there is an incoming notification of new email. |
void |
removeSubscription(java.lang.String sub,
Continuation command)
Adds a subscriptions to the log |
void |
sendMessage(Email email,
Continuation command)
Sends the email to the recipient. |
void |
setInbox(Folder folder)
Reset the inbox folder to be a different folder. |
Methods inherited from class rice.post.PostClient |
---|
getAddress |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INBOX_NAME
protected Logger logger
Constructor Detail |
---|
public EmailService(java.net.InetAddress localHost, Post post, java.security.KeyPair keyPair, boolean logRewrite)
post
- The Post service to usekeyPair
- The keyPair of the local userMethod Detail |
---|
public Post getPost()
public void setInbox(Folder folder)
folder
- The new inboxpublic void getRootFolder(Continuation command)
command
- is the object notified of the result of the folder
retrieval.public void expand(PostUserAddress[] list, SmtpManager manager, Continuation command)
list
- The listcommand
- The command to return the result to (a String[])public void sendMessage(Email email, Continuation command) throws PostException
email
- The email to sendcommand
- is the object that will be notified of errors that occur
during the send procedure, or Boolean(true) if it succeeds.
PostException
- DESCRIBE THE EXCEPTIONpublic void notificationReceived(NotificationMessage nm, Continuation command)
notificationReceived
in class PostClient
nm
- The incoming notification.command
- THe command to return whether or not the notification should be accepted (Boolean true or false)public void getContentHashReferences(Continuation command)
getContentHashReferences
in class PostClient
public void getLogs(Continuation command)
getLogs
in class PostClient
public void getSubscriptions(Continuation command)
public void addSubscription(java.lang.String sub, Continuation command)
sub
- The subscription to addpublic void removeSubscription(java.lang.String sub, Continuation command)
sub
- The subscription to addpublic java.net.InetAddress getLocalHost()
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |