Interface MailboxReaderHandler<T>
- All Known Implementing Classes:
AbstractMailboxReaderHandler
,CompositeMailReaderHandler
,IncomeMailHandler
,LoggingHandler
,MailProcessorHandler
,MessageDeleteHandler
public interface MailboxReaderHandler<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
finish
(MailboxReader.Context<T> context) Called once after iterating finished, regardless of error.void
init
(MailboxReader.Context<T> context) Called once before the reading process starts.void
onMessage
(jakarta.mail.Message message, MailboxReader.Context<T> context) Called for each message.
-
Method Details
-
init
Called once before the reading process starts. -
finish
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. TheMessagingException
is wrapped in aMailException
to comply to the api of this module. All other execptions are propagated (wrapped inRuntimeException
if necessary).- Throws:
jakarta.mail.MessagingException
-