org.apache.james.fetchmail
Class ProcessorAbstract

java.lang.Object
  extended by org.apache.james.fetchmail.ProcessorAbstract
Direct Known Subclasses:
FolderProcessor, MessageProcessor, StoreProcessor

public abstract class ProcessorAbstract
extends java.lang.Object

Class ProcessorAbstract is an abstract class that provides support for JavaMail processors. Concrete implementations are required to implement the abstract method void process() to process a JavaMail element.

Typically, processors are chained. A Store processor delegates to a Folder processor that delegates to a Message processor.

ProcessorAbstract wraps an Account - see org.apache.james.fetchmail.Account - providing contextual information about the environment for the processor.

Creation Date: 27-May-03


Constructor Summary
protected ProcessorAbstract(org.apache.james.fetchmail.Account account)
          Constructor for ProcessorAbstract.
 
Method Summary
protected  java.lang.String computeAttributePrefix()
          Returns the computed attributePrefix.
 org.apache.james.fetchmail.Account getAccount()
          Returns the account.
protected  java.lang.String getAttributePrefix()
          Returns a lazy initialised attributePrefix.
protected  java.util.Set getBlacklist()
          Returns the blacklist.
protected  org.apache.james.fetchmail.ParsedConfiguration getConfiguration()
          Returns the ParsedConfiguration from the Account.
protected  java.lang.String getCustomRecipientHeader()
          Returns the customRecipientHeader.
protected  java.lang.String getDefaultDomainName()
          Returns the defaultDomainName.
protected  java.lang.String getDefaultLocalPart()
          Returns the defaultLocalPart.
protected  java.util.List getDeferredRecipientNotFoundMessageIDs()
          Returns the message ids. of messages for which processing has been deferred as the recipient could not be found
protected  java.lang.String getFetchTaskName()
          Returns the fetchTaskName.
protected  java.lang.String getHost()
          Returns the host.
protected  java.lang.String getJavaMailFolderName()
          Returns the javaMailFolderName.
protected  java.lang.String getJavaMailProviderName()
          Returns the javaMailProviderName.
protected  UsersRepository getLocalUsers()
          Returns the repository of local users.
protected  org.apache.avalon.framework.logger.Logger getLogger()
          Returns the logger.
protected  int getMaxMessageSizeLimit()
          Returns the getMaxMessageSizeLimit.
protected  java.lang.String getPassword()
          Returns the password.
protected  MailAddress getRecipient()
          Returns the recipient.
protected  int getRemoteReceivedHeaderIndex()
          Method getRemoteReceivedHeaderIndex.
protected  MailServer getServer()
          Returns the server.
protected  javax.mail.Session getSession()
          Returns the session.
protected  java.lang.String getUser()
          Returns the user.
protected  boolean isDeferRecipientNotFound()
          Returns the isDeferRecipientNotFound.
protected  boolean isFetchAll()
          Returns the fetchAll.
protected  boolean isIgnoreRecipientHeader()
          Returns the ignoreOriginalRecipient.
protected  boolean isLeave()
          Returns the leave.
protected  boolean isLeaveBlacklisted()
          Returns the leaveBlacklisted.
protected  boolean isLeaveMaxMessageSizeExceeded()
          Returns the LeaveMaxMessageSizeExceeded.
protected  boolean isLeaveRecipientNotFound()
          Returns the leaveRecipientNotFound.
protected  boolean isLeaveRemoteReceivedHeaderInvalid()
          Returns the leaveRemoteReceivedHeaderInvalid.
protected  boolean isLeaveRemoteRecipient()
          Returns the leaveRemoteRecipient.
protected  boolean isLeaveUndeliverable()
          Returns the leaveUndeliverable.
protected  boolean isLeaveUserUndefined()
          Returns the leaveUserUndefinded.
protected  boolean isMarkBlacklistedSeen()
          Returns the markBlacklistedSeen.
protected  boolean isMarkMaxMessageSizeExceededSeen()
          Returns the MarkMaxMessageSizeExceededSeen.
protected  boolean isMarkRecipientNotFoundSeen()
          Returns the markRecipientNotFoundSeen.
protected  boolean isMarkRemoteReceivedHeaderInvalidSeen()
          Returns the markRemoteReceivedHeaderInvalidSeen.
protected  boolean isMarkRemoteRecipientSeen()
          Returns the markRemoteRecipientSeen.
protected  boolean isMarkSeen()
          Returns the markSeen.
protected  boolean isMarkUndeliverableSeen()
          Returns the markUndeliverableSeen.
protected  boolean isMarkUserUndefinedSeen()
          Returns the markUserUndefindedSeen.
protected  boolean isOpenReadOnly()
          Answers true if the folder should be opened read only.
protected  boolean isRecurse()
          Returns the recurse.
protected  boolean isRejectBlacklisted()
          Returns the RejectUserBlacklisted.
protected  boolean isRejectMaxMessageSizeExceeded()
          Returns the RejectMaxMessageSizeExceeded.
protected  boolean isRejectRecipientNotFound()
          Returns the rejectRecipientNotFound.
protected  boolean isRejectRemoteReceivedHeaderInvalid()
          Returns the RejectRemoteReceivedHeaderInvalid.
protected  boolean isRejectRemoteRecipient()
          Returns the RejectRemoteRecipient.
protected  boolean isRejectUserUndefined()
          Returns the RejectUserUndefinded.
abstract  void process()
          Process the mail elements of the receiver
protected  void setAccount(org.apache.james.fetchmail.Account account)
          Sets the account.
protected  void setAttributePrefix(java.lang.String attributePrefix)
          Sets the attributePrefix.
protected  void updateAttributePrefix()
          Updates the attributePrefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorAbstract

protected ProcessorAbstract(org.apache.james.fetchmail.Account account)
Constructor for ProcessorAbstract.

Parameters:
account - The Account to be processed
Method Detail

getDefaultDomainName

protected java.lang.String getDefaultDomainName()
Returns the defaultDomainName.

Returns:
String

getDefaultLocalPart

protected java.lang.String getDefaultLocalPart()
Returns the defaultLocalPart.

Returns:
String

getDeferredRecipientNotFoundMessageIDs

protected java.util.List getDeferredRecipientNotFoundMessageIDs()
Returns the message ids. of messages for which processing has been deferred as the recipient could not be found

Returns:
List

getFetchTaskName

protected java.lang.String getFetchTaskName()
Returns the fetchTaskName.

Returns:
String

getHost

protected java.lang.String getHost()
Returns the host.

Returns:
String

getJavaMailFolderName

protected java.lang.String getJavaMailFolderName()
Returns the javaMailFolderName.

Returns:
String

getJavaMailProviderName

protected java.lang.String getJavaMailProviderName()
Returns the javaMailProviderName.

Returns:
String

getLogger

protected org.apache.avalon.framework.logger.Logger getLogger()
Returns the logger.

Returns:
Logger

getPassword

protected java.lang.String getPassword()
Returns the password.

Returns:
String

getRecipient

protected MailAddress getRecipient()
Returns the recipient.

Returns:
MailAddress

getRemoteReceivedHeaderIndex

protected int getRemoteReceivedHeaderIndex()
Method getRemoteReceivedHeaderIndex.

Returns:
int

getServer

protected MailServer getServer()
Returns the server.

Returns:
MailServer

getSession

protected javax.mail.Session getSession()
Returns the session.

Returns:
Session

getLocalUsers

protected UsersRepository getLocalUsers()
Returns the repository of local users.

Returns:
UsersRepository

getUser

protected java.lang.String getUser()
Returns the user.

Returns:
String

isFetchAll

protected boolean isFetchAll()
Returns the fetchAll.

Returns:
boolean

isDeferRecipientNotFound

protected boolean isDeferRecipientNotFound()
Returns the isDeferRecipientNotFound.

Returns:
boolean

isIgnoreRecipientHeader

protected boolean isIgnoreRecipientHeader()
Returns the ignoreOriginalRecipient.

Returns:
boolean

getCustomRecipientHeader

protected java.lang.String getCustomRecipientHeader()
Returns the customRecipientHeader.

Returns:
String

isLeave

protected boolean isLeave()
Returns the leave.

Returns:
boolean

isMarkSeen

protected boolean isMarkSeen()
Returns the markSeen.

Returns:
boolean

isLeaveBlacklisted

protected boolean isLeaveBlacklisted()
Returns the leaveBlacklisted.

Returns:
boolean

isLeaveRemoteRecipient

protected boolean isLeaveRemoteRecipient()
Returns the leaveRemoteRecipient.

Returns:
boolean

isLeaveUserUndefined

protected boolean isLeaveUserUndefined()
Returns the leaveUserUndefinded.

Returns:
boolean

isLeaveRemoteReceivedHeaderInvalid

protected boolean isLeaveRemoteReceivedHeaderInvalid()
Returns the leaveRemoteReceivedHeaderInvalid.

Returns:
boolean

isLeaveMaxMessageSizeExceeded

protected boolean isLeaveMaxMessageSizeExceeded()
Returns the LeaveMaxMessageSizeExceeded.

Returns:
boolean

isLeaveUndeliverable

protected boolean isLeaveUndeliverable()
Returns the leaveUndeliverable.

Returns:
boolean

isRejectUserUndefined

protected boolean isRejectUserUndefined()
Returns the RejectUserUndefinded.

Returns:
boolean

isRejectRemoteReceivedHeaderInvalid

protected boolean isRejectRemoteReceivedHeaderInvalid()
Returns the RejectRemoteReceivedHeaderInvalid.

Returns:
boolean

isRejectMaxMessageSizeExceeded

protected boolean isRejectMaxMessageSizeExceeded()
Returns the RejectMaxMessageSizeExceeded.

Returns:
boolean

isRejectBlacklisted

protected boolean isRejectBlacklisted()
Returns the RejectUserBlacklisted.

Returns:
boolean

isRejectRemoteRecipient

protected boolean isRejectRemoteRecipient()
Returns the RejectRemoteRecipient.

Returns:
boolean

isMarkBlacklistedSeen

protected boolean isMarkBlacklistedSeen()
Returns the markBlacklistedSeen.

Returns:
boolean

isMarkRecipientNotFoundSeen

protected boolean isMarkRecipientNotFoundSeen()
Returns the markRecipientNotFoundSeen.

Returns:
boolean

isLeaveRecipientNotFound

protected boolean isLeaveRecipientNotFound()
Returns the leaveRecipientNotFound.

Returns:
boolean

isRejectRecipientNotFound

protected boolean isRejectRecipientNotFound()
Returns the rejectRecipientNotFound.

Returns:
boolean

isMarkRemoteRecipientSeen

protected boolean isMarkRemoteRecipientSeen()
Returns the markRemoteRecipientSeen.

Returns:
boolean

isMarkUserUndefinedSeen

protected boolean isMarkUserUndefinedSeen()
Returns the markUserUndefindedSeen.

Returns:
boolean

isMarkRemoteReceivedHeaderInvalidSeen

protected boolean isMarkRemoteReceivedHeaderInvalidSeen()
Returns the markRemoteReceivedHeaderInvalidSeen.

Returns:
boolean

isMarkMaxMessageSizeExceededSeen

protected boolean isMarkMaxMessageSizeExceededSeen()
Returns the MarkMaxMessageSizeExceededSeen.

Returns:
boolean

isMarkUndeliverableSeen

protected boolean isMarkUndeliverableSeen()
Returns the markUndeliverableSeen.

Returns:
boolean

isOpenReadOnly

protected boolean isOpenReadOnly()
Answers true if the folder should be opened read only. For this to be true... - isKeep() must be true - isMarkSeen() must be false

Returns:
boolean

isRecurse

protected boolean isRecurse()
Returns the recurse.

Returns:
boolean

process

public abstract void process()
                      throws javax.mail.MessagingException
Process the mail elements of the receiver

Throws:
javax.mail.MessagingException

getBlacklist

protected java.util.Set getBlacklist()
Returns the blacklist.

Returns:
Set

getConfiguration

protected org.apache.james.fetchmail.ParsedConfiguration getConfiguration()
Returns the ParsedConfiguration from the Account.

Returns:
ParsedConfiguration

getAttributePrefix

protected java.lang.String getAttributePrefix()
Returns a lazy initialised attributePrefix.

Returns:
String

computeAttributePrefix

protected java.lang.String computeAttributePrefix()
Returns the computed attributePrefix.

Returns:
String

setAttributePrefix

protected void setAttributePrefix(java.lang.String attributePrefix)
Sets the attributePrefix.

Parameters:
attributePrefix - The attributePrefix to set

updateAttributePrefix

protected void updateAttributePrefix()
Updates the attributePrefix.


getAccount

public org.apache.james.fetchmail.Account getAccount()
Returns the account.

Returns:
Account

setAccount

protected void setAccount(org.apache.james.fetchmail.Account account)
Sets the account.

Parameters:
account - The account to set

getMaxMessageSizeLimit

protected int getMaxMessageSizeLimit()
Returns the getMaxMessageSizeLimit.

Returns:
int


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.