public class MailFetcher extends Object
Modifier | Constructor and Description |
---|---|
protected |
MailFetcher()
private constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
deleteMessage(javax.mail.Message message)
Deletes an email message.
|
boolean |
expungeMessages()
Expunge (permanently remove) messages having the deleted flag.
|
String |
getUniqueMessageId(javax.mail.Message message)
Returns a unique id for an email message.
|
static MailFetcher |
instance()
Returns the singleton instance of the MailFetcher.
|
void |
shutdown()
Stops the mail-fetcher.
|
void |
startFetching(MailMessageWorker worker)
Blocking method which starts fetching mails.
|
public static MailFetcher instance()
public boolean deleteMessage(javax.mail.Message message)
message
- the messagepublic boolean expungeMessages()
public String getUniqueMessageId(javax.mail.Message message)
message
- the messagepublic void shutdown()
public void startFetching(MailMessageWorker worker) throws MailboxConnectionException
shutdown()
method.worker
- used for processing mailsMailboxConnectionException
- if an error or exception occurs while connecting or listening. The exception
holds information whether a restart at a later time may succeed.Copyright © 2019 Communote team. All rights reserved.