Interface MailStatusResult

  • All Known Implementing Classes:
    EmptyMailStatusResult

    public interface MailStatusResult
    Provides status for each mail in the batch of mails that have been sent.
    Since:
    6.4M3
    Version:
    $Id: ea03ab4194916cb4be3c5322e91975ee960e5cb5 $
    • Method Detail

      • getTotalMailCount

        long getTotalMailCount()
        Returns:
        the total number of mails to be sent in this batch. Note that this value is known only once all mails have been prepared on the Prepare Queue. Until then, the value returned is -1 signifying that the total number is currently unknown. WARNING: If the preparation fails, this number will not reflect the total number of mails that should have been processed, but the number of mail that have been prepared with or without success.
        Since:
        7.1M2
      • getProcessedMailCount

        long getProcessedMailCount()
        Returns:
        the current number of mails that have been processed (sent with success or failed at any stage).
        Since:
        7.1M2
      • waitTillProcessed

        void waitTillProcessed​(long timeout)
        Wait till all messages on the sending queue have been sent (for this batch) before returning.
        Parameters:
        timeout - the maximum amount of time to wait in milliseconds
        Since:
        7.1M2
      • isProcessed

        boolean isProcessed()
        Returns:
        true if all the mails from this batch have been processed (sent successfully or not) or false otherwise
        Since:
        7.1M2
      • getAllErrors

        Iterator<MailStatus> getAllErrors()
        Returns:
        the status for all messages in error.
        Since:
        7.1RC1
      • getByState

        Iterator<MailStatus> getByState​(MailState state)
        Parameters:
        state - the state to match (prepare_success, prepare_error, send_success, send_error or send_fatal_error)
        Returns:
        the status for all mails matching the passed state