Class ImapEventsBatchedGenerator

java.lang.Object
io.jmix.imap.sync.events.ImapEventsBatchedGenerator
All Implemented Interfaces:
ImapEventsGenerator
Direct Known Subclasses:
ImapStandardEventsGenerator

public abstract class ImapEventsBatchedGenerator extends Object implements ImapEventsGenerator
  • Constructor Details

    • ImapEventsBatchedGenerator

      public ImapEventsBatchedGenerator()
  • Method Details

    • generateForNewMessages

      public final Collection<? extends BaseImapEvent> generateForNewMessages(ImapFolder jmixFolder)
      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 interface ImapEventsGenerator
      Parameters:
      jmixFolder - IMAP mailbox folder
      Returns:
      events related to new messages in the folder, can emit not only instances of NewEmailImapEvent
    • generateForChangedMessages

      public final Collection<? extends BaseImapEvent> generateForChangedMessages(ImapFolder jmixFolder)
      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 interface ImapEventsGenerator
      Parameters:
      jmixFolder - IMAP mailbox folder
      Returns:
      events related to modified messages in the folder
    • generateForMissedMessages

      public final Collection<? extends BaseImapEvent> generateForMissedMessages(ImapFolder jmixFolder)
      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 interface ImapEventsGenerator
      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)