|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ikasan.framework.monitor.AbstractMonitorListener
org.ikasan.framework.monitor.MonitorEmailNotifier
public class MonitorEmailNotifier
Monitor listener implementation which sends emails for state changes. By default, this monitor will generate an email
if the initiator its monitoring has current state stoppedInError. To override this behavior, configure the
monitor with a Map of required reported states to email distributions list(s) to notify if current state is a match.
| Constructor Summary | |
|---|---|
MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
List<String> to,
String environment)
Creates a monitor that notifies configured recipients if initiator state is stoppedInError only. |
|
MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
Map<String,List<String>> stateToDistributionListMap,
String environment)
Creates a monitor that matches current initiator state to a map of pre-configured states to recipient list. |
|
MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
String to,
String environment)
Create a monitor that notifies a single recipient if initaitor state is stoppedInError. |
|
| Method Summary | |
|---|---|
void |
notify(String state)
Notification of a change |
void |
setBody(String body)
Setter for mail body text. |
void |
setFrom(String from)
Setter for mail from field |
| Methods inherited from class org.ikasan.framework.monitor.AbstractMonitorListener |
|---|
getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
String to,
String environment)
stoppedInError.
name - Monitor namemailSender - Mail senderto - email distribution listenvironment - Runtime environment
public MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
List<String> to,
String environment)
stoppedInError only.
name - Monitor namemailSender - Mail senderto - email distribution listenvironment - Runtime environment
public MonitorEmailNotifier(String name,
org.springframework.mail.javamail.JavaMailSender mailSender,
Map<String,List<String>> stateToDistributionListMap,
String environment)
name - Monitor namemailSender - Mail senderstateToDistributionListMap - map of initiator states to recipient listenvironment - Runtime envirnoment| Method Detail |
|---|
public void setBody(String body)
body - email message text contentpublic void setFrom(String from)
from - sender email addresspublic void notify(String state)
MonitorListener
notify in interface MonitorListenernotify in class AbstractMonitorListenerstate - The change
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||