Class NestedMailboxFolderReader
java.lang.Object
ch.tocco.nice2.messaging.mail.impl.NestedMailboxFolderReader
- All Implemented Interfaces:
MailboxReader
Implementation of
MailboxReader
that reads all messages of a folder
while recursively stepping down in nested folders.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.messaging.mail.api.MailboxReader
MailboxReader.Context<T>
-
Constructor Summary
ConstructorDescriptionNestedMailboxFolderReader
(org.slf4j.Logger log, jakarta.mail.Folder root, MailboxReaderFactory.Mode mode) -
Method Summary
Modifier and TypeMethodDescription<T> T
readMessages
(MailboxReaderHandler<T> handler) <T> T
readMessages
(jakarta.mail.search.SearchTerm searchTerm, MailboxReaderHandler<T> handler)
-
Constructor Details
-
NestedMailboxFolderReader
public NestedMailboxFolderReader(org.slf4j.Logger log, jakarta.mail.Folder root, MailboxReaderFactory.Mode mode)
-
-
Method Details
-
readMessages
- Specified by:
readMessages
in interfaceMailboxReader
- Throws:
MailException
-
readMessages
public <T> T readMessages(jakarta.mail.search.SearchTerm searchTerm, MailboxReaderHandler<T> handler) throws MailException - Specified by:
readMessages
in interfaceMailboxReader
- Throws:
MailException
-