org.apache.james.management
Interface SpoolManagementMBean

All Known Implementing Classes:
SpoolManagement

public interface SpoolManagementMBean

Expose spool management functionality through JMX.


Method Summary
 java.lang.String[] listSpoolItems(java.lang.String spoolRepositoryURL, java.lang.String state, java.lang.String header, java.lang.String headerValueRegex)
          List mails on the spool matching the given criteria
 int moveSpoolItems(java.lang.String srcSpoolRepositoryURL, java.lang.String srcState, java.lang.String dstSpoolRepositoryURL, java.lang.String dstState, java.lang.String header, java.lang.String headerValueRegex)
          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.lang.String state, java.lang.String header, java.lang.String headerValueRegex)
          Removes one specific or all mails from the given spool repository matching the given criteria
 int resendSpoolItems(java.lang.String spoolRepositoryURL, java.lang.String key, java.lang.String state, java.lang.String header, java.lang.String headerValueRegex)
          (Re-)tries to send one specific or all mails in the given spool repository matching the given criteria
 

Method Detail

moveSpoolItems

int moveSpoolItems(java.lang.String srcSpoolRepositoryURL,
                   java.lang.String srcState,
                   java.lang.String dstSpoolRepositoryURL,
                   java.lang.String dstState,
                   java.lang.String header,
                   java.lang.String headerValueRegex)
                   throws SpoolManagementException
Move all mails from the given repository to another repository matching the given filter criteria

Parameters:
srcSpoolRepositoryURL - the spool whose item are listed
srcState - if not NULL, only mails with matching state are returned
dstSpoolRepositoryURL - the destination spool
dstState - if not NULL, the state will be changed before storing the message to the new repository.
header - if not NULL, only mails with at least one header with a value matching headerValueRegex are returned
headerValueRegex - the regular expression the header must match
Returns:
a counter of moved mails
Throws:
SpoolManagementException

listSpoolItems

java.lang.String[] listSpoolItems(java.lang.String spoolRepositoryURL,
                                  java.lang.String state,
                                  java.lang.String header,
                                  java.lang.String headerValueRegex)
                                  throws SpoolManagementException
List mails on the spool matching the given criteria

Parameters:
spoolRepositoryURL - specifies the spool
state - only mails in the given state are processed, or ALL if NULL
header - the header whose value should be checked
headerValueRegex - regular expression matched against header value. only matching mails are processed
Returns:
number of removed items
Throws:
SpoolManagementException

removeSpoolItems

int removeSpoolItems(java.lang.String spoolRepositoryURL,
                     java.lang.String key,
                     java.lang.String state,
                     java.lang.String header,
                     java.lang.String headerValueRegex)
                     throws SpoolManagementException
Removes one specific or all mails from the given spool repository matching the given criteria

Parameters:
spoolRepositoryURL - specifies the spool
key - identifies the item to be removed. if NULL, all items are removed
state - only mails in the given state are processed, or ALL if NULL
header - the header whose value should be checked
headerValueRegex - regular expression matched against header value. only matching mails are processed
Returns:
number of removed items
Throws:
SpoolManagementException

resendSpoolItems

int resendSpoolItems(java.lang.String spoolRepositoryURL,
                     java.lang.String key,
                     java.lang.String state,
                     java.lang.String header,
                     java.lang.String headerValueRegex)
                     throws SpoolManagementException
(Re-)tries to send one specific or all mails in the given spool repository matching the given criteria

Parameters:
spoolRepositoryURL - specifies the spool
key - identifies the item to be sent. if NULL, all items with status ERROR are sent
state - only mails in the given state are processed, or ALL if NULL
header - the header whose value should be checked
headerValueRegex - regular expression matched against header value. only matching mails are processed
Returns:
number of processed items
Throws:
SpoolManagementException


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