Class MailProcessorImpl
java.lang.Object
ch.tocco.nice2.optional.mailintegration.impl.MailProcessorImpl
- All Implemented Interfaces:
MailProcessor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
cleanup()
Calls theMailWorker.finish(MailWorkerContext)
method of all workers and destroys theMailWorkerContext
fo the current thread.void
Calls theMailWorker.init(MailWorkerConfig)
methods of all workers and creates aMailWorkerContext
for the current thread.void
processMail
(IncomeMail mail, jakarta.mail.URLName mailboxUrl) Applies the specified mail to all workers.void
void
setWorkers
(List<MailWorkerContribution> workers)
-
Constructor Details
-
MailProcessorImpl
public MailProcessorImpl(org.slf4j.Logger log)
-
-
Method Details
-
setWorkers
-
addWorkerContribution
-
removeWorkerContribution
-
initializeWorkers
public void initializeWorkers()Description copied from interface:MailProcessor
Calls theMailWorker.init(MailWorkerConfig)
methods of all workers and creates aMailWorkerContext
for the current thread.- Specified by:
initializeWorkers
in interfaceMailProcessor
-
cleanup
public void cleanup()Description copied from interface:MailProcessor
Calls theMailWorker.finish(MailWorkerContext)
method of all workers and destroys theMailWorkerContext
fo the current thread.- Specified by:
cleanup
in interfaceMailProcessor
-
getCurrentContext
-
processMail
public void processMail(IncomeMail mail, jakarta.mail.URLName mailboxUrl) throws MailProcessingException Description copied from interface:MailProcessor
Applies the specified mail to all workers.- Specified by:
processMail
in interfaceMailProcessor
- Throws:
MailProcessingException
-