|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.mail.EmailMonitor
public class EmailMonitor
EmailMonitor is the main class of the forums email integration feature which allows users to post forum messages by replying to watch notification emails. EmailMonitor periodically checks the configured email account for messages and uses their contents to post replies to forum threads. Replies are posted as the user who sent the email - a special token returned with the subject line is used to authenticate the user and route the message.
The singleton instance of this class is obtained by calling the getInstance() method. To begin the periodic checks for new email, call the start() method. To stop them, call stop(). Multiple calls to start() will not result in multiple email checking tasks, and only one account can be monitored at a time.
EmailTokenManager
,
EmailAction
,
EmailParser
Field Summary | |
---|---|
static java.lang.String |
SSL_FACTORY
Constant holding the class name of the ssl socket factory to install when using ssl. |
Method Summary | |
---|---|
static EmailMonitor |
getInstance()
Returns the singleton instance. |
java.util.regex.Pattern |
getTokenPattern()
Returns a Pattern which can be used to detect the presence of email tokens. |
boolean |
isEnabled()
Returns true if forums is configured to check for incoming mail. |
void |
processMessages()
Checks the email account specified by constructor parameters, reads messages and takes appropriate action based on message content. |
void |
restart()
Stops, then starts email monitoring task. |
void |
sendRejectionMail(EmailMonitorException exception)
Sends rejection mail using supplied EmailMonitorException and property string. |
void |
start()
Starts periodic checking of the mail account. |
void |
start(long delay,
long period)
Starts periodic checking of the mail account. |
void |
stop()
Stops periodic checking of the mail account. |
boolean |
testConnection()
Attempts to connect to the mail server with the currently configured parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SSL_FACTORY
Method Detail |
---|
public static EmailMonitor getInstance()
public void start()
public void start(long delay, long period)
delay
- the number of milliseconds to delay before first check.period
- the number of milliseconds to delay between checks.public void stop()
public void restart()
public boolean testConnection()
public void processMessages()
public void sendRejectionMail(EmailMonitorException exception)
EmailMonitorException
and property string. Throws no exceptions, so it
is safe to use inside a catch block.
exception
- the EmailMonitorException
to use for user and address properties.public java.util.regex.Pattern getTokenPattern()
Pattern
which can be used to detect the presence of email tokens.
Pattern
which can be used to detect the presence of email tokens.public boolean isEnabled()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |