public class FileMailRepository extends AbstractMailRepository
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.
DEEP_DEBUG| Constructor and Description |
|---|
FileMailRepository() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config) |
void |
init() |
protected void |
internalRemove(String key) |
protected void |
internalStore(org.apache.mailet.Mail mc) |
Iterator |
list()
List string keys of messages in repository.
|
org.apache.mailet.Mail |
retrieve(String key)
Retrieves a message given a key.
|
void |
setFileSystem(FileSystem fs) |
public void setFileSystem(FileSystem fs)
protected void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
throws org.apache.commons.configuration.ConfigurationException
doConfigure in class AbstractMailRepositoryorg.apache.commons.configuration.ConfigurationException@PostConstruct public void init() throws Exception
Exceptionprotected void internalStore(org.apache.mailet.Mail mc)
throws javax.mail.MessagingException,
IOException
internalStore in class AbstractMailRepositoryjavax.mail.MessagingExceptionIOExceptionAbstractMailRepository.internalStore(Mail)public org.apache.mailet.Mail retrieve(String key) throws javax.mail.MessagingException
MailRepositorykey - the key of the message to retrievejavax.mail.MessagingExceptionMailRepository.retrieve(String)protected void internalRemove(String key) throws javax.mail.MessagingException
internalRemove in class AbstractMailRepositoryjavax.mail.MessagingExceptionAbstractMailRepository.internalRemove(String)public Iterator list()
MailRepositoryIterator over the list of keys in the repositoryMailRepository.list()Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.