|
||||||||||
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.javamail.AbstractJavamailStoreMailRepository
public abstract class AbstractJavamailStoreMailRepository
MailRepository implementation to store mail in a Javamail store
This implementation should be considered as EXPERIMENTAL.
TODO examine for thread-safety
Field Summary | |
---|---|
protected boolean |
cacheMessages
this has not been tested yet, so it is not configurable. |
protected static boolean |
DEEP_DEBUG
Whether 'deep debugging' is turned on. |
protected org.apache.avalon.framework.logger.Logger |
log
|
Fields inherited from interface org.apache.james.services.MailRepository |
---|
MAIL, ROLE |
Constructor Summary | |
---|---|
AbstractJavamailStoreMailRepository()
|
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
builds destination from attributes destinationURL and postfix. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger log)
Set the Logger to use |
protected FolderGateKeeper |
getFolderGateKeeper()
Lazy-load FolderGateKeeper with inbox folder. |
protected LockInterface |
getLock()
gets the Lock and creates it, if not present. |
protected static java.util.Random |
getRandom()
lazy-loads random |
StoreGateKeeper |
getStore()
offers the underlaying Store for external use |
void |
initialize()
Does nothing |
boolean |
lock(java.lang.String key)
Obtains a lock on a message identified by a key |
void |
remove(java.util.Collection mails)
Remove a list of messages from disk The collection is simply a list of mails to delete |
void |
remove(org.apache.mailet.Mail mail)
Removes a specified message |
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager)
|
boolean |
unlock(java.lang.String key)
Releases a lock on a message identified by a key |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
getLogger, setupLogger, setupLogger, setupLogger |
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.services.MailRepository |
---|
list, remove, retrieve, store |
Methods inherited from interface org.apache.james.mailrepository.javamail.FolderAdapterFactory |
---|
createAdapter |
Field Detail |
---|
protected static final boolean DEEP_DEBUG
protected org.apache.avalon.framework.logger.Logger log
protected boolean cacheMessages
Constructor Detail |
---|
public AbstractJavamailStoreMailRepository()
Method Detail |
---|
public void service(org.apache.avalon.framework.service.ServiceManager serviceManager) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
org.apache.avalon.framework.service.ServiceException
Serviceable.service(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 java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
Initializable.initialize()
protected LockInterface getLock()
public boolean lock(java.lang.String key)
lock
in interface MailRepository
key
- the key of the message to be locked
public boolean unlock(java.lang.String key)
unlock
in interface MailRepository
key
- the key of the message to be unlocked
public void remove(org.apache.mailet.Mail mail) throws javax.mail.MessagingException
remove
in interface MailRepository
mail
- the message to be removed from the repository
javax.mail.MessagingException
public void remove(java.util.Collection mails) throws javax.mail.MessagingException
remove
in interface MailRepository
mails
-
javax.mail.MessagingException
public StoreGateKeeper getStore()
getStore
in interface StoreGateKeeperAware
protected static java.util.Random getRandom()
public void enableLogging(org.apache.avalon.framework.logger.Logger log)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
enableLogging
in class org.apache.avalon.framework.logger.AbstractLogEnabled
AbstractLogEnabled.enableLogging(Logger)
protected FolderGateKeeper getFolderGateKeeper()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |