| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.mailrepository.javamail.AbstractJavamailStoreMailRepository
public abstract class AbstractJavamailStoreMailRepository
MailRepository implementation to store mail in a Javamail store
 
 This implementation should be considered as EXPERIMENTAL. 
 
 TODO examine for thread-safety
| Field Summary | |
|---|---|
protected  boolean | 
cacheMessages
this has not been tested yet, so it is not configurable.  | 
protected static boolean | 
DEEP_DEBUG
Whether 'deep debugging' is turned on.  | 
protected  org.apache.avalon.framework.logger.Logger | 
log
 | 
| Fields inherited from interface org.apache.james.services.MailRepository | 
|---|
MAIL, ROLE | 
| Constructor Summary | |
|---|---|
AbstractJavamailStoreMailRepository()
 | 
|
| Method Summary | |
|---|---|
 void | 
configure(org.apache.avalon.framework.configuration.Configuration conf)
builds destination from attributes destinationURL and postfix.  | 
 void | 
enableLogging(org.apache.avalon.framework.logger.Logger log)
Set the Logger to use  | 
protected  FolderGateKeeper | 
getFolderGateKeeper()
Lazy-load FolderGateKeeper with inbox folder.  | 
protected  LockInterface | 
getLock()
gets the Lock and creates it, if not present.  | 
protected static java.util.Random | 
getRandom()
lazy-loads random  | 
 StoreGateKeeper | 
getStore()
offers the underlaying Store for external use  | 
 void | 
initialize()
Does nothing  | 
 boolean | 
lock(java.lang.String key)
Obtains a lock on a message identified by a key  | 
 void | 
remove(java.util.Collection mails)
Remove a list of messages from disk The collection is simply a list of mails to delete  | 
 void | 
remove(org.apache.mailet.Mail mail)
Removes a specified message  | 
 void | 
service(org.apache.avalon.framework.service.ServiceManager serviceManager)
 | 
 boolean | 
unlock(java.lang.String key)
Releases a lock on a message identified by a key  | 
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled | 
|---|
getLogger, setupLogger, setupLogger, setupLogger | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.apache.james.services.MailRepository | 
|---|
list, remove, retrieve, store | 
| Methods inherited from interface org.apache.james.mailrepository.javamail.FolderAdapterFactory | 
|---|
createAdapter | 
| Field Detail | 
|---|
protected static final boolean DEEP_DEBUG
protected org.apache.avalon.framework.logger.Logger log
protected boolean cacheMessages
| Constructor Detail | 
|---|
public AbstractJavamailStoreMailRepository()
| Method Detail | 
|---|
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
             throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceableorg.apache.avalon.framework.service.ServiceExceptionServiceable.service(ServiceManager)
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(Configuration)
public void initialize()
                throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.ExceptionInitializable.initialize()protected LockInterface getLock()
public boolean lock(java.lang.String key)
lock in interface MailRepositorykey - the key of the message to be locked
public boolean unlock(java.lang.String key)
unlock in interface MailRepositorykey - the key of the message to be unlocked
public void remove(org.apache.mailet.Mail mail)
            throws javax.mail.MessagingException
remove in interface MailRepositorymail - the message to be removed from the repository
javax.mail.MessagingException
public void remove(java.util.Collection mails)
            throws javax.mail.MessagingException
remove in interface MailRepositorymails - 
javax.mail.MessagingExceptionpublic StoreGateKeeper getStore()
getStore in interface StoreGateKeeperAwareprotected static java.util.Random getRandom()
public void enableLogging(org.apache.avalon.framework.logger.Logger log)
enableLogging in interface org.apache.avalon.framework.logger.LogEnabledenableLogging in class org.apache.avalon.framework.logger.AbstractLogEnabledAbstractLogEnabled.enableLogging(Logger)protected FolderGateKeeper getFolderGateKeeper()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||