public class MailEventProcessor extends EventProcessor
| Constructor and Description |
|---|
MailEventProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createContent(String source,
Serializable event,
int retriesLeft)
This method creates the mail content from the supplied information.
|
protected String |
createSubject(String source,
Serializable event,
int retriesLeft)
This method creates the mail subject from the supplied information.
|
String |
getContentScript()
This method returns the content script.
|
String |
getContentType()
This method returns the content type.
|
String |
getFrom()
This method gets the 'from' email address.
|
String |
getJNDIName()
This method gets the JNDI name for the mail session.
|
String |
getSubjectScript()
This method returns the subject script.
|
List<String> |
getTo()
This method gets the 'to' email addresses.
|
void |
init()
This method initializes the event processor.
|
protected void |
initContentScript()
Initialize the content script.
|
protected void |
initSubjectScript()
Initialize the subject script.
|
Serializable |
process(String source,
Serializable event,
int retriesLeft)
This method processes the supplied event, and optionally
returns a transformed representation to be forwarded to
other processors.
|
void |
setContentScript(String script)
This method sets the content script.
|
void |
setContentType(String type)
This method sets the content type.
|
void |
setFrom(String from)
This method set the 'from' email address.
|
void |
setJNDIName(String jndiName)
This method set the JNDI name for the mail session.
|
void |
setSubjectScript(String script)
This method sets the subject script.
|
void |
setTo(List<String> to)
This method set the 'to' email addresses.
|
protected void |
validate()
This method validates that the event processor has the required
configuration.
|
close, getAsynchronous, getParameters, getResultHandler, getServices, setAsynchronous, setParameters, setResultHandler, setServicespublic void init()
throws Exception
init in class EventProcessorException - Failed to initializeprotected void validate()
throws Exception
Exceptionprotected void initSubjectScript()
throws Exception
Exception - Failed to initializeprotected void initContentScript()
throws Exception
Exception - Failed to initializepublic String getJNDIName()
public void setJNDIName(String jndiName)
jndiName - The JNDI namepublic List<String> getTo()
public void setTo(List<String> to)
to - The 'to' email addressespublic String getFrom()
public void setFrom(String from)
from - The 'from' email addresspublic String getSubjectScript()
public void setSubjectScript(String script)
script - The subject scriptpublic String getContentScript()
public void setContentScript(String script)
script - The content scriptpublic String getContentType()
public void setContentType(String type)
type - The content typeprotected String createSubject(String source, Serializable event, int retriesLeft) throws Exception
source - The sourceevent - The eventretriesLeft - The retries leftException - Failed to create subjectprotected String createContent(String source, Serializable event, int retriesLeft) throws Exception
source - The sourceevent - The eventretriesLeft - The retries leftException - Failed to create subjectpublic Serializable process(String source, Serializable event, int retriesLeft) throws Exception
If the event cannot be processed at this time, then an exception should be thrown to initiate a retry. The number of remaining retries is supplied, to enable the processor to take appropriate error reporting action.
process in class EventProcessorsource - The source event processor name that generated the eventevent - The event to processretriesLeft - The number of retries leftException - Failed to process event, requesting retryCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.