Class MailProcessorHandler
java.lang.Object
ch.tocco.nice2.messaging.mail.api.AbstractMailboxReaderHandler<ReaderResult>
ch.tocco.nice2.optional.mailintegration.impl.handler.MailProcessorHandler
- All Implemented Interfaces:
- MailboxReaderHandler<ReaderResult>
Gets the 
IncomeMail object from the context and feeds in into the MailProcessor. If
 this was successful, the message is marked for deletion so it is removed from the inbox after the
 reader completes. The message is only deleted, if MessageDeleteHandler is configured as
 the last MailboxReaderHandler.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfinish(MailboxReader.Context<ReaderResult> context) Called once after iterating finished, regardless of error.voidinit(MailboxReader.Context<ReaderResult> context) Called once before the reading process starts.voidonMessage(jakarta.mail.Message message, MailboxReader.Context<ReaderResult> context) Called for each message.voidsetExceptionHandler(ExceptionHandler<IncomeMail> exceptionHandler) 
- 
Constructor Details- 
MailProcessorHandler
 
- 
- 
Method Details- 
setExceptionHandler
- 
initDescription copied from interface:MailboxReaderHandlerCalled once before the reading process starts.- Specified by:
- initin interface- MailboxReaderHandler<ReaderResult>
- Overrides:
- initin class- AbstractMailboxReaderHandler<ReaderResult>
 
- 
finishDescription copied from interface:MailboxReaderHandlerCalled once after iterating finished, regardless of error.- Specified by:
- finishin interface- MailboxReaderHandler<ReaderResult>
- Overrides:
- finishin class- AbstractMailboxReaderHandler<ReaderResult>
 
- 
onMessagepublic void onMessage(jakarta.mail.Message message, MailboxReader.Context<ReaderResult> context) throws jakarta.mail.MessagingException Description copied from interface:MailboxReaderHandlerCalled for each message. TheMessagingExceptionis wrapped in aMailExceptionto comply to the api of this module. All other execptions are propagated (wrapped inRuntimeExceptionif necessary).- Throws:
- jakarta.mail.MessagingException
 
 
-