org.apache.james.mailrepository.file
Class FileMailRepository

java.lang.Object
  extended by org.apache.james.mailrepository.lib.AbstractMailRepository
      extended by org.apache.james.mailrepository.file.FileMailRepository
All Implemented Interfaces:
Configurable, LogEnabled, MailRepository

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.

Version:
1.0.0, 24/04/1999

Field Summary
 
Fields inherited from class org.apache.james.mailrepository.lib.AbstractMailRepository
DEEP_DEBUG, store
 
Constructor Summary
FileMailRepository()
           
 
Method Summary
protected  void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
           
 void init()
           
protected  void internalRemove(java.lang.String key)
           
protected  void internalStore(org.apache.mailet.Mail mc)
           
 java.util.Iterator list()
           
 org.apache.mailet.Mail retrieve(java.lang.String key)
           
 
Methods inherited from class org.apache.james.mailrepository.lib.AbstractMailRepository
configure, getLogger, lock, remove, remove, remove, setLog, setStore, store, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileMailRepository

public FileMailRepository()
Method Detail

doConfigure

protected void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
                    throws org.apache.commons.configuration.ConfigurationException
Overrides:
doConfigure in class AbstractMailRepository
Throws:
org.apache.commons.configuration.ConfigurationException

init

@PostConstruct
public void init()
          throws java.lang.Exception
Throws:
java.lang.Exception

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
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()
See Also:
MailRepository.list()


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.