org.sadun.util.watchdog.listeners
Class MailAlarmListener
java.lang.Object
org.sadun.util.watchdog.listeners.WaitAndRetryListener
org.sadun.util.watchdog.listeners.MailAlarmListener
- All Implemented Interfaces:
- WatchDog.Listener
- public class MailAlarmListener
- extends WaitAndRetryListener
NOTE: this class relies on javamail.
You need to download and install both the
JavaBeans Activation Framework
and JavaMail to compile and run it.
- Version:
- 1.0
- Author:
- Cristiano Sadun
Constructor Summary |
MailAlarmListener()
|
MailAlarmListener(int maxRetryCount,
java.lang.String emailAddresses,
java.lang.String hostname,
java.lang.String mailTemplateURL)
|
MailAlarmListener(java.lang.String emailAddresses,
java.lang.String hostname,
java.lang.String mailTemplateURL)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MailAlarmListener
public MailAlarmListener(java.lang.String emailAddresses,
java.lang.String hostname,
java.lang.String mailTemplateURL)
throws java.net.MalformedURLException
MailAlarmListener
public MailAlarmListener(int maxRetryCount,
java.lang.String emailAddresses,
java.lang.String hostname,
java.lang.String mailTemplateURL)
throws java.net.MalformedURLException
- Parameters:
emailAddresses
- a comma-separated list of email addresseshostname
- the name of the SMTP hostmaxRetryCount
-
MailAlarmListener
public MailAlarmListener()
checkFailed
public void checkFailed(java.lang.Object obj,
java.lang.Throwable e)
- Description copied from interface:
WatchDog.Listener
- Notifies the listener that a check has failed.
- Specified by:
checkFailed
in interface WatchDog.Listener
- Specified by:
checkFailed
in class WaitAndRetryListener
getMailTemplateURL
public java.lang.String getMailTemplateURL()
- Returns:
- Returns the mailTemplateURL.
setMailTemplateURL
public void setMailTemplateURL(java.lang.String mailTemplateURL)
throws java.net.MalformedURLException
- Parameters:
mailTemplateURL
- The mailTemplateURL to set.
- Throws:
java.net.MalformedURLException
getEmailAddresses
public java.lang.String getEmailAddresses()
- Returns:
- Returns the emailAddresses.
setEmailAddresses
public void setEmailAddresses(java.lang.String emailAddresses)
- Parameters:
emailAddresses
- The emailAddresses to set.
getHostname
public java.lang.String getHostname()
- Returns:
- Returns the hostname.
setHostname
public void setHostname(java.lang.String hostname)
- Parameters:
hostname
- The hostname to set.