Interface MailboxReaderHandler<T>

All Known Implementing Classes:
AbstractMailboxReaderHandler, CompositeMailReaderHandler, IncomeMailHandler, LoggingHandler, MailProcessorHandler, MessageDeleteHandler

public interface MailboxReaderHandler<T>
  • Method Details

    • init

      void init(MailboxReader.Context<T> context)
      Called once before the reading process starts.
    • finish

      void finish(MailboxReader.Context<T> context)
      Called once after iterating finished, regardless of error.
    • onMessage

      void onMessage(jakarta.mail.Message message, MailboxReader.Context<T> context) throws jakarta.mail.MessagingException
      Called for each message. The MessagingException is wrapped in a MailException to comply to the api of this module. All other execptions are propagated (wrapped in RuntimeException if necessary).
      Throws:
      jakarta.mail.MessagingException