Class IncomeMailHandler
java.lang.Object
ch.tocco.nice2.messaging.mail.api.AbstractMailboxReaderHandler<ReaderResult>
ch.tocco.nice2.optional.mailintegration.impl.handler.IncomeMailHandler
- All Implemented Interfaces:
MailboxReaderHandler<ReaderResult>
Creates a
IncomeMail object from each Message and sets it into
the MailboxReader.Context using the hashCode() of the
Message object as key.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcreateKey(jakarta.mail.Message message) 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.Methods inherited from class ch.tocco.nice2.messaging.mail.api.AbstractMailboxReaderHandler
finish
-
Constructor Details
-
IncomeMailHandler
-
-
Method Details
-
init
Description copied from interface:MailboxReaderHandlerCalled once before the reading process starts.- Specified by:
initin interfaceMailboxReaderHandler<ReaderResult>- Overrides:
initin classAbstractMailboxReaderHandler<ReaderResult>
-
onMessage
public 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
-
createKey
-