org.apache.james.management
Interface SpoolManagementService

All Known Implementing Classes:
SpoolManagement

public interface SpoolManagementService


Field Summary
static java.lang.String ROLE
           
 
Method Summary
 java.util.List getSpoolItems(java.lang.String spoolRepositoryURL, SpoolFilter filter)
          Return a List which contains all mails which can accessed by given spoolRepositoryUrl and matched the given SpoolFilter
 int moveSpoolItems(java.lang.String srcSpoolRepositoryURL, java.lang.String dstSpoolRepositoryURL, java.lang.String dstState, SpoolFilter filter)
          Move all mails from the given repository to another repository matching the given filter criteria
 int removeSpoolItems(java.lang.String spoolRepositoryURL, java.lang.String key, java.util.List lockingFailures, SpoolFilter filter)
          Removes all mails from the given repository matching the filter
 int resendSpoolItems(java.lang.String spoolRepositoryURL, java.lang.String key, java.util.List lockingFailures, SpoolFilter filter)
          Tries to resend all mails from the given repository matching the given filter criteria
 

Field Detail

ROLE

static final java.lang.String ROLE
See Also:
Constant Field Values
Method Detail

moveSpoolItems

int moveSpoolItems(java.lang.String srcSpoolRepositoryURL,
                   java.lang.String dstSpoolRepositoryURL,
                   java.lang.String dstState,
                   SpoolFilter filter)
                   throws javax.mail.MessagingException,
                          SpoolManagementException
Move all mails from the given repository to another repository matching the given filter criteria

Parameters:
srcSpoolRepositoryURL - the spool whose item are listed
dstSpoolRepositoryURL - the destination spool
dstState - if not NULL, the state will be changed before storing the message to the new repository.
filter - the filter to select messages from the source repository
Returns:
a counter of moved mails
Throws:
javax.mail.MessagingException
SpoolManagementException

removeSpoolItems

int removeSpoolItems(java.lang.String spoolRepositoryURL,
                     java.lang.String key,
                     java.util.List lockingFailures,
                     SpoolFilter filter)
                     throws javax.mail.MessagingException,
                            SpoolManagementException
Removes all mails from the given repository matching the filter

Parameters:
spoolRepositoryURL - the spool whose item are listed
key - ID of the mail to be removed. if not NULL, all other filters are ignored
lockingFailures - is populated with a list of mails which could not be processed because a lock could not be obtained
filter - the criteria against which all mails are matched. only applied if key is NULL.
Returns:
number of removed mails
Throws:
javax.mail.MessagingException
SpoolManagementException

resendSpoolItems

int resendSpoolItems(java.lang.String spoolRepositoryURL,
                     java.lang.String key,
                     java.util.List lockingFailures,
                     SpoolFilter filter)
                     throws javax.mail.MessagingException,
                            SpoolManagementException
Tries to resend all mails from the given repository matching the given filter criteria

Parameters:
spoolRepositoryURL - the spool whose item are about to be resend
key - ID of the mail to be resend. if not NULL, all other filters are ignored
lockingFailures - is populated with a list of mails which could not be processed because a lock could not be obtained
filter - the criteria against which all mails are matched. only applied if key is NULL.
Returns:
int number of resent mails
Throws:
javax.mail.MessagingException
SpoolManagementException

getSpoolItems

java.util.List getSpoolItems(java.lang.String spoolRepositoryURL,
                             SpoolFilter filter)
                             throws javax.mail.MessagingException,
                                    SpoolManagementException
Return a List which contains all mails which can accessed by given spoolRepositoryUrl and matched the given SpoolFilter

Parameters:
spoolRepositoryURL - the url under which a spool can be accessed
filter - the SpoolFilter to use
Returns:
List all matching mails from the given spool
Throws:
javax.mail.MessagingException
SpoolManagementException


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.