Package io.jmix.imap.sync.events
Class ImapEventsBatchedGenerator
java.lang.Object
io.jmix.imap.sync.events.ImapEventsBatchedGenerator
- All Implemented Interfaces:
ImapEventsGenerator
- Direct Known Subclasses:
ImapStandardEventsGenerator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Collection<? extends BaseImapEvent>
generateForChangedMessages
(ImapFolder jmixFolder) Emits events for modified messages in a mailbox folder accumulated since the previous call of this method for the folderprotected abstract Collection<? extends BaseImapEvent>
generateForChangedMessages
(ImapFolder jmixFolder, int batchSize) final Collection<? extends BaseImapEvent>
generateForMissedMessages
(ImapFolder jmixFolder) 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 folderprotected abstract Collection<? extends BaseImapEvent>
generateForMissedMessages
(ImapFolder jmixFolder, int batchSize) final Collection<? extends BaseImapEvent>
generateForNewMessages
(ImapFolder jmixFolder) Emits events for new messages in a mailbox folder accumulated since the previous call of this method for the folderprotected abstract Collection<? extends BaseImapEvent>
generateForNewMessages
(ImapFolder jmixFolder, int batchSize) protected abstract int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.imap.ImapEventsGenerator
init, shutdown
-
Constructor Details
-
ImapEventsBatchedGenerator
public ImapEventsBatchedGenerator()
-
-
Method Details
-
generateForNewMessages
Description copied from interface:ImapEventsGenerator
Emits events for new messages in a mailbox folder accumulated since the previous call of this method for the folder- Specified by:
generateForNewMessages
in interfaceImapEventsGenerator
- Parameters:
jmixFolder
- IMAP mailbox folder- Returns:
- events related to new messages in the folder,
can emit not only instances of
NewEmailImapEvent
-
generateForChangedMessages
Description copied from interface:ImapEventsGenerator
Emits events for modified messages in a mailbox folder accumulated since the previous call of this method for the folder- Specified by:
generateForChangedMessages
in interfaceImapEventsGenerator
- Parameters:
jmixFolder
- IMAP mailbox folder- Returns:
- events related to modified messages in the folder
-
generateForMissedMessages
Description copied from interface:ImapEventsGenerator
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- Specified by:
generateForMissedMessages
in interfaceImapEventsGenerator
- Parameters:
jmixFolder
- IMAP mailbox folder- Returns:
- events related to missed messages in the folder
-
getBatchSize
protected abstract int getBatchSize() -
generateForNewMessages
protected abstract Collection<? extends BaseImapEvent> generateForNewMessages(ImapFolder jmixFolder, int batchSize) -
generateForChangedMessages
protected abstract Collection<? extends BaseImapEvent> generateForChangedMessages(ImapFolder jmixFolder, int batchSize) -
generateForMissedMessages
protected abstract Collection<? extends BaseImapEvent> generateForMissedMessages(ImapFolder jmixFolder, int batchSize)
-