|
||||||||||
| 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.AvalonMailRepository
public class AvalonMailRepository
Implementation of a MailRepository on a FileSystem. Requires a configuration element in the .conf.xml file of the form: <repository destinationURL="file://path-to-root-dir-for-repository" type="MAIL" model="SYNCHRONOUS"/> Requires a logger called MailRepository.
| Field Summary | |
|---|---|
protected static boolean |
DEEP_DEBUG
Whether 'deep debugging' is turned on. |
| Fields inherited from interface org.apache.james.services.MailRepository |
|---|
MAIL, ROLE |
| Constructor Summary | |
|---|---|
AvalonMailRepository()
|
|
| Method Summary | |
|---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
initialize()
|
java.util.Iterator |
list()
List string keys of messages in repository. |
boolean |
lock(java.lang.String key)
Obtains a lock on a message identified by a key |
void |
remove(java.util.Collection mails)
Removes a Collection of mails from the repository |
void |
remove(Mail mail)
Removes a specified message |
void |
remove(java.lang.String key)
Removes a message identified by key. |
Mail |
retrieve(java.lang.String key)
Retrieves a message given a key. |
void |
service(org.apache.avalon.framework.service.ServiceManager componentManager)
|
void |
store(Mail mc)
Stores a message in this repository. |
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 |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final boolean DEEP_DEBUG
| Constructor Detail |
|---|
public AvalonMailRepository()
| Method Detail |
|---|
public void service(org.apache.avalon.framework.service.ServiceManager componentManager)
throws org.apache.avalon.framework.service.ServiceException
service in interface org.apache.avalon.framework.service.Serviceableorg.apache.avalon.framework.service.ServiceExceptionorg.apache.avalon.framework.service.Serviceable#compose(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()public boolean unlock(java.lang.String key)
unlock in interface MailRepositorykey - the key of the message to be unlocked
public boolean lock(java.lang.String key)
lock in interface MailRepositorykey - the key of the message to be locked
public void store(Mail mc)
throws javax.mail.MessagingException
store in interface MailRepositorymc - the mail message to store
javax.mail.MessagingException
public Mail retrieve(java.lang.String key)
throws javax.mail.MessagingException
retrieve in interface MailRepositorykey - the key of the message to retrieve
javax.mail.MessagingException
public void remove(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 - The Collection of MailImpl's to delete
javax.mail.MessagingException
public void remove(java.lang.String key)
throws javax.mail.MessagingException
remove in interface MailRepositorykey - the key of the message to be removed from the repository
javax.mail.MessagingExceptionpublic java.util.Iterator list()
list in interface MailRepositoryIterator over the list of keys in the repository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||