|
|||||||||||
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
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()
|
Iterator |
list()
List string keys of messages in repository. |
boolean |
lock(String key)
Obtains a lock on a message identified by a key |
void |
remove(Collection mails)
Removes a Collection of mails from the repository |
void |
remove(Mail mail)
Removes a specified message |
void |
remove(String key)
Removes a message identified by key. |
Mail |
retrieve(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(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.Serviceable
org.apache.avalon.framework.service.ServiceException
org.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.Configurable
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
Exception
Initializable.initialize()
public boolean unlock(String key)
unlock
in interface MailRepository
key
- the key of the message to be unlocked
public boolean lock(String key)
lock
in interface MailRepository
key
- the key of the message to be locked
public void store(Mail mc) throws MessagingException
store
in interface MailRepository
mc
- the mail message to store
MessagingException
public Mail retrieve(String key) throws MessagingException
retrieve
in interface MailRepository
key
- the key of the message to retrieve
MessagingException
public void remove(Mail mail) throws MessagingException
remove
in interface MailRepository
mail
- the message to be removed from the repository
MessagingException
public void remove(Collection mails) throws MessagingException
remove
in interface MailRepository
mails
- The Collection of MailImpl
's to delete
MessagingException
public void remove(String key) throws MessagingException
remove
in interface MailRepository
key
- the key of the message to be removed from the repository
MessagingException
public Iterator list()
list
in interface MailRepository
Iterator
over the list of keys in the repository
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |