Package io.jmix.imap
Interface ImapEventsGenerator
- All Known Implementing Classes:
ImapEventsBatchedGenerator
,ImapStandardEventsGenerator
public interface ImapEventsGenerator
An extension point for IMAP events. A bean implementing this interface can be specified in an IMAP configuration.
Such beans can be useful for applying IMAP extensions and custom communication mechanisms specific
for particular mailboxes
-
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends BaseImapEvent>
generateForChangedMessages
(ImapFolder folder) Emits events for modified messages in a mailbox folder accumulated since the previous call of this method for the folderCollection<? extends BaseImapEvent>
generateForMissedMessages
(ImapFolder folder) Emits events for missed (moved to other folder or deleted) messages in a mailbox folder accumulated since the previous call of this method for the folderCollection<? extends BaseImapEvent>
generateForNewMessages
(ImapFolder folder) Emits events for new messages in a mailbox folder accumulated since the previous call of this method for the foldervoid
init
(ImapMailBox mailBox) Performs bootstrap logic for mailbox synchronization, e.g.void
shutdown
(ImapMailBox mailBox) Releases resources used for synchronization, e.g.
-
Method Details
-
init
Performs bootstrap logic for mailbox synchronization, e.g. attaching listeners or schedule background tasks- Parameters:
mailBox
- IMAP mailbox
-
shutdown
Releases resources used for synchronization, e.g. detaching listeners or cancelling scheduled background tasks- Parameters:
mailBox
- IMAP mailbox
-
generateForNewMessages
Emits events for new messages in a mailbox folder accumulated since the previous call of this method for the folder- Parameters:
folder
- IMAP mailbox folder- Returns:
- events related to new messages in the folder,
can emit not only instances of
NewEmailImapEvent
-
generateForChangedMessages
Emits events for modified messages in a mailbox folder accumulated since the previous call of this method for the folder- Parameters:
folder
- IMAP mailbox folder- Returns:
- events related to modified messages in the folder
-
generateForMissedMessages
Emits events for missed (moved to other folder or deleted) messages in a mailbox folder accumulated since the previous call of this method for the folder- Parameters:
folder
- IMAP mailbox folder- Returns:
- events related to missed messages in the folder
-