org.apache.james.services
Interface MailRepository

All Known Subinterfaces:
SpoolRepository
All Known Implementing Classes:
AvalonMailRepository, AvalonSpoolRepository, JDBCMailRepository, JDBCSpoolRepository

public interface MailRepository

Interface for a Repository to store Mails.

Version:
1.0.0, 24/04/1999
Author:
Federico Barbieri
, Charles Benett

Field Summary
static java.lang.String MAIL
          Define a MAIL repository.
 
Method Summary
 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(MailImpl mail)
          Removes a specified message
 void remove(java.lang.String key)
          Removes a message identified by key.
 MailImpl retrieve(java.lang.String key)
          Retrieves a message given a key.
 void store(MailImpl mc)
          Stores a message in this repository.
 boolean unlock(java.lang.String key)
          Releases a lock on a message identified the key
 

Field Detail

MAIL

public static final java.lang.String MAIL
Define a MAIL repository. MAILS are stored in the specified destination.

See Also:
Constant Field Values
Method Detail

store

public void store(MailImpl mc)
Stores a message in this repository. Shouldn't this return the key under which it is stored?


list

public java.util.Iterator list()
List string keys of messages in repository.


retrieve

public MailImpl retrieve(java.lang.String key)
Retrieves a message given a key. At the moment, keys can be obtained from list() in superinterface Store.Repository


remove

public void remove(MailImpl mail)
Removes a specified message


remove

public void remove(java.lang.String key)
Removes a message identified by key.


lock

public boolean lock(java.lang.String key)
Obtains a lock on a message identified by key


unlock

public boolean unlock(java.lang.String key)
Releases a lock on a message identified the key



"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."