public abstract class AbstractMailRepository extends Object implements MailRepository, LogEnabled, Configurable
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEEP_DEBUG
Whether 'deep debugging' is turned on.
|
Constructor and Description |
---|
AbstractMailRepository() |
Modifier and Type | Method and Description |
---|---|
void |
configure(org.apache.commons.configuration.HierarchicalConfiguration configuration)
Configure the object.
|
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)
Obtains a lock on a message identified by key
|
void |
remove(Collection<org.apache.mailet.Mail> mails)
Remove an Collection of mails from the repository
|
void |
remove(org.apache.mailet.Mail mail)
Removes a specified message
|
void |
remove(String key)
Removes a message identified by key.
|
void |
setLog(org.slf4j.Logger logger)
Sets the service log.
|
void |
store(org.apache.mailet.Mail mc)
Stores a message in this repository.
|
boolean |
unlock(String key)
Releases a lock on a message identified the key
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
list, retrieve
protected static final boolean DEEP_DEBUG
public void setLog(org.slf4j.Logger logger)
LogEnabled
setLog
in interface LogEnabled
logger
- not nullprotected org.slf4j.Logger getLogger()
public void configure(org.apache.commons.configuration.HierarchicalConfiguration configuration) throws org.apache.commons.configuration.ConfigurationException
Configurable
configure
in interface Configurable
org.apache.commons.configuration.ConfigurationException
protected void doConfigure(org.apache.commons.configuration.HierarchicalConfiguration config) throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public boolean unlock(String key)
MailRepository
unlock
in interface MailRepository
key
- the key of the message to be unlockedMailRepository.unlock(String)
public boolean lock(String key)
MailRepository
lock
in interface MailRepository
key
- the key of the message to be lockedMailRepository.lock(String)
public void store(org.apache.mailet.Mail mc) throws javax.mail.MessagingException
MailRepository
store
in interface MailRepository
mc
- the mail message to storejavax.mail.MessagingException
MailRepository.store(Mail)
protected abstract void internalStore(org.apache.mailet.Mail mc) throws javax.mail.MessagingException, IOException
javax.mail.MessagingException
IOException
store(Mail)
public void remove(org.apache.mailet.Mail mail) throws javax.mail.MessagingException
MailRepository
remove
in interface MailRepository
mail
- the message to be removed from the repositoryjavax.mail.MessagingException
MailRepository.remove(Mail)
public void remove(Collection<org.apache.mailet.Mail> mails) throws javax.mail.MessagingException
MailRepository
remove
in interface MailRepository
mails
- The Collection of MailImpl
's to deletejavax.mail.MessagingException
MailRepository.remove(Collection)
public void remove(String key) throws javax.mail.MessagingException
MailRepository
remove
in interface MailRepository
key
- the key of the message to be removed from the repositoryjavax.mail.MessagingException
MailRepository.remove(String)
protected abstract void internalRemove(String key) throws javax.mail.MessagingException
javax.mail.MessagingException
remove(String)
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.