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 AbstractMailRepository
org.apache.commons.configuration.ConfigurationException
@PostConstruct public void init() throws Exception
Exception
protected void internalStore(org.apache.mailet.Mail mc) throws javax.mail.MessagingException, IOException
internalStore
in class AbstractMailRepository
javax.mail.MessagingException
IOException
AbstractMailRepository.internalStore(Mail)
public org.apache.mailet.Mail retrieve(String key) throws javax.mail.MessagingException
MailRepository
key
- the key of the message to retrievejavax.mail.MessagingException
MailRepository.retrieve(String)
protected void internalRemove(String key) throws javax.mail.MessagingException
internalRemove
in class AbstractMailRepository
javax.mail.MessagingException
AbstractMailRepository.internalRemove(String)
public Iterator list()
MailRepository
Iterator
over the list of keys in the repositoryMailRepository.list()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.