This MBean is meant to send a mail given certain situation. It may be used to listen to a monitor
or timer and send a mail.
To use it you need to add to your classpath the mail.jar from the JavaMail API and the activation.jar
from the Java Activation Framework.
Besides you need to configure all the required fields, at least the serverHost and To fields and if your server
requires login also the serverUsername and serverPassword fields
The subject and content fields are subject to keyword expansions, i.e. some keyworks put between $ signs will
be exapnded this can be used to give a more informative message. The current available expansions are
$date$ -> Current date formatted with locale format
$time$ -> Current tim formatted with locale format
$datetime$ -> Current date and time formatted with locale format
$notification$ -> Notification type
$observed$ -> ObjectName of the observed object
$objectname$ -> This MBean's objectname
handleNotification
public void handleNotification(javax.management.Notification notification,
Object handback)
- handleNotification in interface javax.management.NotificationListener
postDeregister
public void postDeregister()
- postDeregister in interface javax.management.MBeanRegistration
postRegister
public void postRegister(Boolean registrationDone)
- postRegister in interface javax.management.MBeanRegistration
preDeregister
public void preDeregister()
throws java.lang.Exception
- preDeregister in interface javax.management.MBeanRegistration
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
Gathers some basic data
- preRegister in interface javax.management.MBeanRegistration
registerListener
protected void registerListener()
setCC
public void setCC(String ccAddresses)
- setCC in interface SMTPMBean
setObservedObject
public void setObservedObject(javax.management.ObjectName targetMBeanName)
- setObservedObject in interface SMTPMBean
setTo
public void setTo(String toAddresses)
- setTo in interface SMTPMBean
unregisterListener
protected void unregisterListener()