public class ImapMailboxConnection extends MailboxConnection
| Constructor and Description |
|---|
ImapMailboxConnection(boolean secure) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
expungeMessages()
Expunge messages with the deleted flag.
|
protected javax.mail.Folder |
getFolder()
Returns the mailbox folder or null if not initialized or available.
|
String |
getProtocolName()
Returns the name of the protocol used by this connection (e.g.
|
String |
getUniqueMessageId(javax.mail.Message message)
Returns a unique id for an email message.
|
boolean |
initialize()
Initializes the connection from configuration properties using the
ConfigurationManager. |
protected void |
prepareFetching(String mailbox)
Subclasses should use this method for protocol specific initialization.
|
protected void |
processUndeletedMessages(MailMessageWorker worker)
Processes all undeleted messages in a mailbox.
|
protected void |
startCheckMessages()
Starts checking for messages and blocks until another thread calls the
MailboxConnection.disconnect()
method or an error or exception (e.g. |
protected void |
stopCheckMessages()
Interrupt the check messages loop that was started in
MailboxConnection.startCheckMessages(). |
disconnect, getFetchTimeout, getMessageStore, isShouldStop, startListeningpublic ImapMailboxConnection(boolean secure)
secure - whether to use a secure connection exists or notpublic boolean expungeMessages()
expungeMessages in class MailboxConnectionprotected javax.mail.Folder getFolder()
getFolder in class MailboxConnectionpublic String getProtocolName()
getProtocolName in class MailboxConnectionpublic String getUniqueMessageId(javax.mail.Message message)
getUniqueMessageId in class MailboxConnectionmessage - the messagepublic boolean initialize()
ConfigurationManager. This does not include opening the connection to the mail
server.initialize in class MailboxConnectionprotected void prepareFetching(String mailbox) throws MailboxConnectionException
prepareFetching in class MailboxConnectionmailbox - the mailbox to use. Subclasses should ignore this parameter if they only support a
specific mailboxMailboxConnectionException - if the connection to the mailbox (folder) failed or was lostprotected void processUndeletedMessages(MailMessageWorker worker)
processUndeletedMessages in class MailboxConnectionworker - the worker processing the messagesprotected void startCheckMessages()
throws MailboxConnectionException
MailboxConnection.disconnect()
method or an error or exception (e.g. connection closed, server unreachable) occurs.startCheckMessages in class MailboxConnectionMailboxConnectionException - in case the message check loop was interrupted by an error or exceptionprotected void stopCheckMessages()
MailboxConnection.startCheckMessages(). This
method should only be run from another thread than the one that called
MailboxConnection.startCheckMessages().stopCheckMessages in class MailboxConnectionCopyright © 2019 Communote team. All rights reserved.