|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MonitoringStrategy
Defines the contract for objects that monitor a given folder for new messages. Allows for multiple implementation
strategies, including polling, or event-driven techniques such as IMAP's IDLE command.
| Method Summary | |
|---|---|
int |
getFolderOpenMode()
Returns the folder open mode to be used by this strategy. |
javax.mail.Message[] |
monitor(javax.mail.Folder folder)
Monitors the given folder, and returns any new messages when they arrive. |
| Method Detail |
|---|
javax.mail.Message[] monitor(javax.mail.Folder folder)
throws javax.mail.MessagingException,
InterruptedException
folder - the folder in which to look for new messages
javax.mail.MessagingException - in case of JavaMail errors
InterruptedException - if a thread is interruptedint getFolderOpenMode()
Folder.READ_ONLY or Folder.READ_WRITE.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||