org.apache.james.mailrepository
Class AvalonMailRepository
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.james.mailrepository.AbstractMailRepository
org.apache.james.mailrepository.AvalonMailRepository
- All Implemented Interfaces:
- org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, MailRepository
- Direct Known Subclasses:
- AvalonSpoolRepository
public class AvalonMailRepository
- 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.
- Version:
- 1.0.0, 24/04/1999
Method Summary |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
initialize()
|
protected void |
internalRemove(java.lang.String key)
|
protected void |
internalStore(org.apache.mailet.Mail mc)
|
java.util.Iterator |
list()
List string keys of messages in repository. |
org.apache.mailet.Mail |
retrieve(java.lang.String key)
Retrieves a message given 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 |
AvalonMailRepository
public AvalonMailRepository()
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
- Throws:
org.apache.avalon.framework.configuration.ConfigurationException
- See Also:
Configurable.configure(Configuration)
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize
in interface org.apache.avalon.framework.activity.Initializable
- Overrides:
initialize
in class AbstractMailRepository
- Throws:
java.lang.Exception
- See Also:
Initializable.initialize()
internalStore
protected void internalStore(org.apache.mailet.Mail mc)
throws javax.mail.MessagingException,
java.io.IOException
- Specified by:
internalStore
in class AbstractMailRepository
- Throws:
javax.mail.MessagingException
java.io.IOException
- See Also:
AbstractMailRepository.internalStore(Mail)
retrieve
public org.apache.mailet.Mail retrieve(java.lang.String key)
throws javax.mail.MessagingException
- Description copied from interface:
MailRepository
- Retrieves a message given a key. At the moment, keys can be obtained
from list() in superinterface Store.Repository
- Parameters:
key
- the key of the message to retrieve
- Returns:
- the mail corresponding to this key, null if none exists
- Throws:
javax.mail.MessagingException
- See Also:
MailRepository.retrieve(String)
internalRemove
protected void internalRemove(java.lang.String key)
throws javax.mail.MessagingException
- Specified by:
internalRemove
in class AbstractMailRepository
- Throws:
javax.mail.MessagingException
- See Also:
AbstractMailRepository.internalRemove(String)
list
public java.util.Iterator list()
- Description copied from interface:
MailRepository
- List string keys of messages in repository.
- Returns:
- an
Iterator
over the list of keys in the repository - See Also:
MailRepository.list()
Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.