|
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.spi.EmailIntegrationProvider
public abstract class EmailIntegrationProvider
Interface to allow some degree of pluggability in the email integration features. Implementors of this interface can determine
which messages will be used or ignored by the system, how the message contents are parsed, which actions can occur, and
how message tokens are evaluated. A default implementation exists (DefaultIntegrationProvider
), and it is probably
better to subclass it than to implement this interface directly if you only want to add functionality rather than override it.
Constructor Summary | |
---|---|
EmailIntegrationProvider()
|
Method Summary | |
---|---|
abstract boolean |
canProcessMessage(javax.mail.Message message)
Returns true if the supplied Message is one which the system can do something useful with. |
protected abstract EmailActionBuilder |
getActionBuilder()
Returns an EmailActionBuilder which can build EmailAction instances for any email message where
calls to canProcessMessage(javax.mail.Message) return true. |
EmailAction |
getActionForMessage(InboundMessage message)
Creates and returns an EmailAction which represents the response to the supplied InboundMessage . |
protected abstract EmailParser |
getParser(InboundMessage message)
Returns an EmailParser initilized with the supplied InboundMessage . |
abstract EmailTokenManager |
getTokenManager()
Returns an EmailTokenManager instance for reading and creating message tokens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EmailIntegrationProvider()
Method Detail |
---|
public abstract boolean canProcessMessage(javax.mail.Message message) throws javax.mail.MessagingException, java.io.IOException
Message
is one which the system can do something useful with. In general, the
contents of the subject and any other headers are examined for patterns which indicate it is really intended for
forums to deal with and not junk mail.
message
- the message to examine.
Message
is one which the system can do something useful with.
javax.mail.MessagingException
- if accessing the message data fails.
java.io.IOException
- if accessing the messge data fails.public abstract EmailTokenManager getTokenManager()
EmailTokenManager
instance for reading and creating message tokens.
EmailTokenManager
instance for reading and creating message tokens.protected abstract EmailActionBuilder getActionBuilder()
EmailActionBuilder
which can build EmailAction
instances for any email message where
calls to canProcessMessage(javax.mail.Message)
return true.
EmailActionBuilder
which can build EmailAction
instances for any email message where
calls to canProcessMessage(javax.mail.Message)
return true.protected abstract EmailParser getParser(InboundMessage message) throws EmailMonitorException
EmailParser
initilized with the supplied InboundMessage
. Calling EmailParser.parse(com.jivesoftware.forum.mail.InboundMessage)
will parse the message and make its relevant contents available through accessor properties of the parser instance.
message
- the message to parse.
EmailParser
initilized with the supplied InboundMessage
.
EmailMonitorException
- if no parser can be determined, or if any access of the message contents fails.public EmailAction getActionForMessage(InboundMessage message) throws EmailMonitorException
EmailAction
which represents the response to the supplied InboundMessage
.
message
- the message to read, parse, and create a corresponding action for.
EmailAction
in response to the suppliec InboundMessage
.
EmailMonitorException
- if an error occurs while reading or parsing the message, or if no appropriate response
action can be determined.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |