|
||||||||||
| 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.MailStoreSpoolRepository
public class MailStoreSpoolRepository
This is a wrapper for the various implementations of SpoolRepositories. This does select the real spool repository via the select method of the provided Store.
The select method requires a configuration object with the form:
<spoolrepository destinationURL="file://path-to-root-dir-for-repository"
type="SPOOL">
</spoolrepository>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.james.services.SpoolRepository |
|---|
SpoolRepository.AcceptFilter |
| Field Summary |
|---|
| Fields inherited from interface org.apache.james.services.SpoolRepository |
|---|
ROLE, SPOOL |
| Fields inherited from interface org.apache.james.services.MailRepository |
|---|
MAIL |
| Constructor Summary | |
|---|---|
MailStoreSpoolRepository()
|
|
| Method Summary | |
|---|---|
Mail |
accept()
Returns an arbitrarily selected mail deposited in this Repository. |
Mail |
accept(long delay)
Returns an arbitrarily select mail deposited in this Repository that is either ready immediately for delivery, or is younger than it's last_updated plus the number of failed attempts times the delay time. |
Mail |
accept(SpoolRepository.AcceptFilter filter)
Returns an arbitrarily select mail deposited in this Repository for which the supplied filter's accept method returns true. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
void |
initialize()
|
java.util.Iterator |
list()
List string keys of messages in repository. |
boolean |
lock(java.lang.String key)
Obtains a lock on a message identified by key |
void |
remove(java.util.Collection mails)
Remove an Collection of mails from the repository |
void |
remove(Mail mail)
Removes a specified message |
void |
remove(java.lang.String key)
Removes a message identified by key. |
Mail |
retrieve(java.lang.String key)
Retrieves a message given a key. |
void |
service(org.apache.avalon.framework.service.ServiceManager serviceManager)
|
void |
store(Mail mc)
Stores a message in this repository. |
boolean |
unlock(java.lang.String key)
Releases a lock on a message identified the 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 |
| Constructor Detail |
|---|
public MailStoreSpoolRepository()
| 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.Serviceableorg.apache.avalon.framework.service.ServiceExceptionServiceable.service(org.apache.avalon.framework.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.Configurableorg.apache.avalon.framework.configuration.ConfigurationExceptionConfigurable.configure(org.apache.avalon.framework.configuration.Configuration)
public void initialize()
throws java.lang.Exception
initialize in interface org.apache.avalon.framework.activity.Initializablejava.lang.ExceptionInitializable.initialize()
public Mail accept()
throws java.lang.InterruptedException
SpoolRepository
accept in interface SpoolRepositoryjava.lang.InterruptedExceptionSpoolRepository.accept()
public Mail accept(long delay)
throws java.lang.InterruptedException
SpoolRepository
accept in interface SpoolRepositoryjava.lang.InterruptedExceptionSpoolRepository.accept(long)
public Mail accept(SpoolRepository.AcceptFilter filter)
throws java.lang.InterruptedException
SpoolRepository
accept in interface SpoolRepositoryjava.lang.InterruptedExceptionSpoolRepository.accept(org.apache.james.services.SpoolRepository.AcceptFilter)
public void store(Mail mc)
throws javax.mail.MessagingException
MailRepository
store in interface MailRepositorymc - the mail message to store
javax.mail.MessagingExceptionorg.apache.james.services.MailRepository#store(org.apache.james.core.MailImpl)
public java.util.Iterator list()
throws javax.mail.MessagingException
MailRepository
list in interface MailRepositoryIterator over the list of keys in the repository
javax.mail.MessagingExceptionMailRepository.list()
public Mail retrieve(java.lang.String key)
throws javax.mail.MessagingException
MailRepository
retrieve in interface MailRepositorykey - the key of the message to retrieve
javax.mail.MessagingExceptionMailRepository.retrieve(java.lang.String)
public void remove(Mail mail)
throws javax.mail.MessagingException
MailRepository
remove in interface MailRepositorymail - the message to be removed from the repository
javax.mail.MessagingExceptionorg.apache.james.services.MailRepository#remove(org.apache.james.core.MailImpl)
public void remove(java.util.Collection mails)
throws javax.mail.MessagingException
MailRepository
remove in interface MailRepositorymails - The Collection of MailImpl's to delete
javax.mail.MessagingExceptionMailRepository.remove(java.util.Collection)
public void remove(java.lang.String key)
throws javax.mail.MessagingException
MailRepository
remove in interface MailRepositorykey - the key of the message to be removed from the repository
javax.mail.MessagingExceptionMailRepository.remove(java.lang.String)
public boolean lock(java.lang.String key)
throws javax.mail.MessagingException
MailRepository
lock in interface MailRepositorykey - the key of the message to be locked
javax.mail.MessagingExceptionMailRepository.lock(java.lang.String)
public boolean unlock(java.lang.String key)
throws javax.mail.MessagingException
MailRepository
unlock in interface MailRepositorykey - the key of the message to be unlocked
javax.mail.MessagingExceptionMailRepository.unlock(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||