public class FolderProcessor extends ProcessorAbstract
Class FolderProcessor
opens a Folder and iterates over all of
the Messages, delegating their processing to MessageProcessor
.
If isRecurse(), all subfolders are fetched recursively.
Modifier | Constructor and Description |
---|---|
protected |
FolderProcessor(javax.mail.Folder folder,
org.apache.james.fetchmail.Account account)
Constructor for FolderProcessor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
close()
Method close.
|
protected Boolean |
computeMarkSeenPermanent()
Answer the result of computing markSeenPermanent.
|
protected javax.mail.Folder |
getFolder()
Returns the folder.
|
protected boolean |
handleMarkSeenNotPermanent(javax.mail.internet.MimeMessage aMessage)
Handler for when the folder does not support the SEEN flag.
|
protected Boolean |
isMarkSeenPermanent()
Returns the isMarkSeenPermanent.
|
protected boolean |
isSeen(javax.mail.internet.MimeMessage aMessage)
Answer if
aMessage has been SEEN. |
protected void |
open()
Method open.
|
void |
process()
Method process opens a Folder, fetches the Envelopes for all of its
Messages, creates a
MessageProcessor and runs it to process
each message. |
protected void |
recurse()
Method recurse.
|
protected void |
setFolder(javax.mail.Folder folder)
Sets the folder.
|
protected void |
setMarkSeenPermanent(Boolean markSeenPermanent)
Sets the markSeenPermanent.
|
protected void |
updateMarkSeenPermanent()
Updates the markSeenPermanent.
|
computeAttributePrefix, getAccount, getAttributePrefix, getBlacklist, getConfiguration, getCustomRecipientHeader, getDefaultDomainName, getDefaultLocalPart, getDeferredRecipientNotFoundMessageIDs, getDNSServer, getFetchTaskName, getHost, getJavaMailFolderName, getJavaMailProviderName, getLocalUsers, getLogger, getMailQueue, getMaxMessageSizeLimit, getPassword, getRecipient, getRemoteReceivedHeaderIndex, getSession, getUser, isDeferRecipientNotFound, isFetchAll, isIgnoreRecipientHeader, isLeave, isLeaveBlacklisted, isLeaveMaxMessageSizeExceeded, isLeaveRecipientNotFound, isLeaveRemoteReceivedHeaderInvalid, isLeaveRemoteRecipient, isLeaveUndeliverable, isLeaveUserUndefined, isMarkBlacklistedSeen, isMarkMaxMessageSizeExceededSeen, isMarkRecipientNotFoundSeen, isMarkRemoteReceivedHeaderInvalidSeen, isMarkRemoteRecipientSeen, isMarkSeen, isMarkUndeliverableSeen, isMarkUserUndefinedSeen, isOpenReadOnly, isRecurse, isRejectBlacklisted, isRejectMaxMessageSizeExceeded, isRejectRecipientNotFound, isRejectRemoteReceivedHeaderInvalid, isRejectRemoteRecipient, isRejectUserUndefined, setAccount, setAttributePrefix, updateAttributePrefix
protected FolderProcessor(javax.mail.Folder folder, org.apache.james.fetchmail.Account account)
folder
- The folder to be fetchedaccount
- The account being processedpublic void process() throws javax.mail.MessagingException
MessageProcessor
and runs it to process
each message.process
in class ProcessorAbstract
javax.mail.MessagingException
ProcessorAbstract.process()
protected void close() throws javax.mail.MessagingException
javax.mail.MessagingException
protected void recurse() throws javax.mail.MessagingException
javax.mail.MessagingException
protected void open() throws javax.mail.MessagingException
javax.mail.MessagingException
protected javax.mail.Folder getFolder()
protected boolean isSeen(javax.mail.internet.MimeMessage aMessage) throws javax.mail.MessagingException
aMessage
has been SEEN.aMessage
- javax.mail.MessagingException
protected Boolean computeMarkSeenPermanent()
protected boolean handleMarkSeenNotPermanent(javax.mail.internet.MimeMessage aMessage) throws javax.mail.MessagingException
Handler for when the folder does not support the SEEN flag. The default behaviour implemented here is to answer the value of the SEEN flag anyway.
Subclasses may choose to override this method and implement their own solutions.
aMessage
- javax.mail.MessagingException
protected void setFolder(javax.mail.Folder folder)
folder
- The folder to setprotected Boolean isMarkSeenPermanent()
protected void setMarkSeenPermanent(Boolean markSeenPermanent)
markSeenPermanent
- The isMarkSeenPermanent to setprotected void updateMarkSeenPermanent()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.