public class MailFetcher extends java.lang.Object implements JPropertiesListener, AlarmListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALARM_MAIL_FETCHER |
static java.lang.String |
CONTEXT_MAILFETCHER |
static java.lang.String |
REVISION |
Modifier | Constructor and Description |
---|---|
protected |
MailFetcher() |
Modifier and Type | Method and Description |
---|---|
void |
addArchiveMailPattern(java.lang.String pattern,
ArchiveMailListener.ArchiveMailCriteria criteria) |
void |
addMailListener(MailListener ml) |
protected java.util.Collection<MailMessage.Part> |
decodeMultipart(javax.mail.Message msg) |
void |
fetch(MailAccount account)
Fetch given MailAccount and Fire MailMessage to listeners.
|
protected void |
fireFetchMessage(MailAccount account,
MailMessage mail) |
ArchiveMailListener |
getArchiveMailListener() |
MailAccount |
getLastFetchAccount()
Returns the latest Mail Account fetched
|
java.util.Map<java.lang.String,MailAccount> |
getMailAccountMap()
Retrieve MailAccount list from properties
|
static java.lang.String |
getMessageIdQuietly(javax.mail.Message msg)
Returns the messageId for the given message.
|
void |
handleAlarm(AlarmEntry entry)
Invoked when an alarm is triggered.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
removeArchiveMailPattern(java.lang.String pattern) |
void |
removeMailListener(MailListener ml) |
public static final java.lang.String REVISION
public static final java.lang.String ALARM_MAIL_FETCHER
public static final java.lang.String CONTEXT_MAILFETCHER
public void handleAlarm(AlarmEntry entry)
AlarmListener
handleAlarm
in interface AlarmListener
entry
- the AlarmEntry which has been triggered.public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public MailAccount getLastFetchAccount()
public java.util.Map<java.lang.String,MailAccount> getMailAccountMap()
public void addMailListener(MailListener ml)
public void removeMailListener(MailListener ml)
protected void fireFetchMessage(MailAccount account, MailMessage mail)
public ArchiveMailListener getArchiveMailListener()
public void addArchiveMailPattern(java.lang.String pattern, ArchiveMailListener.ArchiveMailCriteria criteria)
public void removeArchiveMailPattern(java.lang.String pattern)
public static java.lang.String getMessageIdQuietly(javax.mail.Message msg)
msg
- the javax.mail.Messagepublic void fetch(MailAccount account)
account
- the mailAccount to Fetchprotected java.util.Collection<MailMessage.Part> decodeMultipart(javax.mail.Message msg) throws javax.mail.MessagingException, java.io.IOException
javax.mail.MessagingException
java.io.IOException
Copyright © 2001-2010 Jalios SA. All Rights Reserved.