|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jca.adapters.mail.inflow.MailFolder
public abstract class MailFolder

An encapsulation of a mail store folder used by the MailActivation.run to poll and retrieve new messages.
| Constructor Summary | |
|---|---|
MailFolder(MailActivationSpec spec)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
Closes the mail session |
protected void |
close(boolean checkSuccessful)
Closes a mail session |
protected abstract void |
closeStore(boolean success,
javax.mail.Store store,
javax.mail.Folder folder)
Close a store |
static MailFolder |
getInstance(MailActivationSpec mailActivationSpec)
Get an instance of a mail folder |
protected abstract javax.mail.Message[] |
getMessages(javax.mail.Folder folder)
Get the messages from a folder |
boolean |
hasNext()
|
protected abstract void |
markMessageSeen(javax.mail.Message message)
Mark a message as seen |
Object |
next()
|
void |
open()
Open a mail session |
protected abstract javax.mail.Store |
openStore(javax.mail.Session session)
Open a store |
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MailFolder(MailActivationSpec spec)
spec - The mail activation spec| Method Detail |
|---|
public void open()
throws Exception
Exception - Thrown if a session can't be established
public void close()
throws javax.mail.MessagingException
javax.mail.MessagingException - Thrown if an error occurs duing closepublic boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic void remove()
remove in interface Iteratorprotected void close(boolean checkSuccessful)
checkSuccessful - Check if it was a successful closepublic static MailFolder getInstance(MailActivationSpec mailActivationSpec)
mailActivationSpec - The mail activation spec
null if not IMAP / POP based
protected abstract javax.mail.Store openStore(javax.mail.Session session)
throws javax.mail.NoSuchProviderException
session - The mail session
javax.mail.NoSuchProviderException - Thrown if there is no provider
protected abstract void closeStore(boolean success,
javax.mail.Store store,
javax.mail.Folder folder)
throws javax.mail.MessagingException
success - Check for successful closestore - The storefolder - The folder
javax.mail.MessagingException - Thrown if there is an error
protected abstract javax.mail.Message[] getMessages(javax.mail.Folder folder)
throws javax.mail.MessagingException
folder - The folder
javax.mail.MessagingException - Thrown if there is an error
protected abstract void markMessageSeen(javax.mail.Message message)
throws javax.mail.MessagingException
message - The messages
javax.mail.MessagingException - Thrown if there is an error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||