org.apache.james.mailrepository.lib
Class AbstractMailRepository

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

public abstract class AbstractMailRepository
extends Object
implements MailRepository, LogEnabled, Configurable

This class represent an AbstractMailRepository. All MailRepositories should extend this class.


Field Summary
protected static boolean DEEP_DEBUG
          Whether 'deep debugging' is turned on.
 
Constructor Summary
AbstractMailRepository()
           
 
Method Summary
 void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
           
protected  void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config)
           
protected  org.slf4j.Logger getLogger()
           
protected abstract  void internalRemove(String key)
           
protected abstract  void internalStore(org.apache.mailet.Mail mc)
           
 boolean lock(String key)
           
 void remove(Collection<org.apache.mailet.Mail> mails)
           
 void remove(org.apache.mailet.Mail mail)
           
 void remove(String key)
           
 void setLog(org.slf4j.Logger logger)
           
 void store(org.apache.mailet.Mail mc)
           
 boolean unlock(String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.james.mailrepository.api.MailRepository
list, retrieve
 

Field Detail

DEEP_DEBUG

protected static final boolean DEEP_DEBUG
Whether 'deep debugging' is turned on.

See Also:
Constant Field Values
Constructor Detail

AbstractMailRepository

public AbstractMailRepository()
Method Detail

setLog

public void setLog(org.slf4j.Logger logger)
Specified by:
setLog in interface LogEnabled

getLogger

protected org.slf4j.Logger getLogger()

configure

public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
               throws org.apache.commons.configuration.ConfigurationException
Specified by:
configure in interface Configurable
Throws:
org.apache.commons.configuration.ConfigurationException

doConfigure

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

unlock

public boolean unlock(String key)
Specified by:
unlock in interface MailRepository
See Also:
MailRepository.unlock(String)

lock

public boolean lock(String key)
Specified by:
lock in interface MailRepository
See Also:
MailRepository.lock(String)

store

public void store(org.apache.mailet.Mail mc)
           throws javax.mail.MessagingException
Specified by:
store in interface MailRepository
Throws:
javax.mail.MessagingException
See Also:
MailRepository.store(Mail)

internalStore

protected abstract void internalStore(org.apache.mailet.Mail mc)
                               throws javax.mail.MessagingException,
                                      IOException
Throws:
javax.mail.MessagingException
IOException
See Also:
store(Mail)

remove

public void remove(org.apache.mailet.Mail mail)
            throws javax.mail.MessagingException
Specified by:
remove in interface MailRepository
Throws:
javax.mail.MessagingException
See Also:
MailRepository.remove(Mail)

remove

public void remove(Collection<org.apache.mailet.Mail> mails)
            throws javax.mail.MessagingException
Specified by:
remove in interface MailRepository
Throws:
javax.mail.MessagingException
See Also:
MailRepository.remove(Collection)

remove

public void remove(String key)
            throws javax.mail.MessagingException
Specified by:
remove in interface MailRepository
Throws:
javax.mail.MessagingException
See Also:
MailRepository.remove(String)

internalRemove

protected abstract void internalRemove(String key)
                                throws javax.mail.MessagingException
Throws:
javax.mail.MessagingException
See Also:
remove(String)


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