FileDocCategorySizeDatePackage
MailStoreSpoolRepository.javaAPI DocApache James 2.3.16150Fri Jan 12 12:56:24 GMT 2007org.apache.james.mailrepository

MailStoreSpoolRepository

public class MailStoreSpoolRepository extends org.apache.avalon.framework.logger.AbstractLogEnabled implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.james.services.SpoolRepository
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>

version
This is $Revision: 165416 $

Fields Summary
private org.apache.james.services.SpoolRepository
spoolRep
The wrapped spoolRepository
private org.apache.avalon.cornerstone.services.store.Store
mailStore
The providing mailStore
private org.apache.avalon.framework.configuration.Configuration
configuration
The repository configuration
Constructors Summary
Methods Summary
public org.apache.mailet.Mailaccept()

see
org.apache.james.services.SpoolRepository#accept()

        return spoolRep.accept();
    
public org.apache.mailet.Mailaccept(long delay)

see
org.apache.james.services.SpoolRepository#accept(long)

        return spoolRep.accept(delay); 
    
public org.apache.mailet.Mailaccept(SpoolRepository.AcceptFilter filter)

see
org.apache.james.services.SpoolRepository#accept(org.apache.james.services.SpoolRepository.AcceptFilter)

        return spoolRep.accept(filter);
    
public voidconfigure(org.apache.avalon.framework.configuration.Configuration conf)

see
org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)

        this.configuration = conf;
    
public voidinitialize()

see
org.apache.avalon.framework.activity.Initializable#initialize()

        try {
            spoolRep  = (SpoolRepository) mailStore.select(configuration);
        } catch (Exception e) {
            getLogger().error("Cannot open private SpoolRepository");
            throw e;
        }
        if (getLogger().isInfoEnabled()) {
            getLogger().info("SpoolRepository opened: "
                      + spoolRep.hashCode());
        }
    
public java.util.Iteratorlist()

see
org.apache.james.services.MailRepository#list()

        return spoolRep.list();
    
public booleanlock(java.lang.String key)

see
org.apache.james.services.MailRepository#lock(java.lang.String)

        return spoolRep.lock(key);
    
public voidremove(org.apache.mailet.Mail mail)

see
org.apache.james.services.MailRepository#remove(org.apache.james.core.MailImpl)

        spoolRep.remove(mail);
    
public voidremove(java.util.Collection mails)

see
org.apache.james.services.MailRepository#remove(java.util.Collection)

        spoolRep.remove(mails);
    
public voidremove(java.lang.String key)

see
org.apache.james.services.MailRepository#remove(java.lang.String)

        spoolRep.remove(key);
    
public org.apache.mailet.Mailretrieve(java.lang.String key)

see
org.apache.james.services.MailRepository#retrieve(java.lang.String)

        return spoolRep.retrieve(key);
    
public voidservice(org.apache.avalon.framework.service.ServiceManager serviceManager)

see
org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)

        mailStore = (Store) serviceManager.lookup(Store.ROLE);
    
public voidstore(org.apache.mailet.Mail mc)

see
org.apache.james.services.MailRepository#store(org.apache.james.core.MailImpl)

        spoolRep.store(mc);
    
public booleanunlock(java.lang.String key)

see
org.apache.james.services.MailRepository#unlock(java.lang.String)

        return spoolRep.unlock(key);