Package io.jmix.imap.sync
Class ImapSynchronizer
java.lang.Object
io.jmix.imap.sync.ImapSynchronizer
- Direct Known Subclasses:
ImapFlaglessSynchronizer
-
Field Summary
Modifier and TypeFieldDescriptionprotected SystemAuthenticator
protected javax.persistence.EntityManager
protected ImapDataProvider
protected ImapHelper
protected ImapMessageSyncDataProvider
protected ImapOperations
protected ImapProperties
protected Metadata
protected TimeSource
protected org.springframework.transaction.support.TransactionTemplate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
close
(ImapMailBox mailBox, com.sun.mail.imap.IMAPFolder imapFolder) protected ImapMessage
createMessage
(com.sun.mail.imap.IMAPMessage msg, ImapFolder jmixFolder) protected void
handleExistingMessages
(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder folder, com.sun.mail.imap.IMAPFolder imapFolder) protected void
handleMissedMessages
(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> missedMessages) protected void
handleNewMessages
(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder jmixFolder, com.sun.mail.imap.IMAPFolder imapFolder) protected void
setAnswersFlag
(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> checkAnswers) protected void
setTransactionManager
(org.springframework.transaction.PlatformTransactionManager transactionManager) void
synchronize
(ImapMailBox imapMailBox) protected void
unsetCustomFlags
(javax.mail.Message msg)
-
Field Details
-
imapHelper
-
imapOperations
-
entityManager
protected javax.persistence.EntityManager entityManager -
imapProperties
-
authenticator
-
imapDataProvider
-
imapMessageSyncDataProvider
-
metadata
-
timeSource
-
transaction
protected org.springframework.transaction.support.TransactionTemplate transaction
-
-
Constructor Details
-
ImapSynchronizer
public ImapSynchronizer()
-
-
Method Details
-
setTransactionManager
@Autowired protected void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) -
synchronize
-
handleExistingMessages
protected void handleExistingMessages(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder folder, com.sun.mail.imap.IMAPFolder imapFolder) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
handleNewMessages
protected void handleNewMessages(List<ImapMessage> checkAnswers, List<ImapMessage> missedMessages, ImapFolder jmixFolder, com.sun.mail.imap.IMAPFolder imapFolder) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
handleMissedMessages
protected void handleMissedMessages(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> missedMessages) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
setAnswersFlag
protected void setAnswersFlag(ImapMailBox mailBox, com.sun.mail.imap.IMAPStore store, List<ImapMessage> checkAnswers) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
close
-
createMessage
protected ImapMessage createMessage(com.sun.mail.imap.IMAPMessage msg, ImapFolder jmixFolder) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
unsetCustomFlags
protected void unsetCustomFlags(javax.mail.Message msg) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-