|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.jmx.core.StandardMBeanFix
wt.jmx.core.StandardMBean
wt.jmx.core.SelfAwareMBean
wt.jmx.core.mbeans.Emailer
public final class Emailer
This MBean acts as an e-mailing utility service for other MBeans and provides
centralized configuration of MBean e-mailing.
Supported API: true
Extendable: false
| Nested Class Summary | |
|---|---|
static interface |
Emailer.DestroyableProvider
Emailer will call destroy() method on any EmailContentProvider that implements this method. |
static class |
Emailer.EmailBodyProvider
Convenience implementation of EmailContentProvider interface for use when the e-mail is to consist of a single, simple body part. |
static interface |
Emailer.EmailContentProvider
Wrapper interface for e-mail content which allows just-in-time determination of content, i.e. |
static class |
Emailer.SimpleMultipartProvider
Simple implementation of EmailContentProvider which returns a predesignated Multipart object. |
static class |
Emailer.SimpleTextProvider
Specialization of EmailBodyProvider for text whose type and contents are known at time of construction. |
static class |
wt.jmx.core.mbeans.Emailer.SingleUrlProvider
For e-mailing single, uncompressed files as attachments. |
static class |
wt.jmx.core.mbeans.Emailer.SingleZippedUrlProvider
For e-mailing single file as a zipped attachment. |
static class |
wt.jmx.core.mbeans.Emailer.ZipProvider
For e-mailing multiple files as a zipped attachment. |
| Method Summary | |
|---|---|
void |
emailTextFile(File file,
String addressesOrEmailList,
String subject,
long maxLines,
long maxChars)
E-mail last portion of text file Supported API: true |
void |
emailZipOfFiles(URL baseURL,
URL[] urls,
String addressesOrEmailList,
String subject)
E-mail zip of files. |
static Emailer |
getInstance(StandardMBean mbeanContext,
boolean throwExceptionOnNoInstance)
Return the Emailer associated by MBeanLoader with 'mbeanContext' or the Emailer started and still not stopped within this classloader. |
void |
sendEmail(InternetAddress[] recipients,
String subject,
Emailer.EmailContentProvider contents)
Send e-mail to array of e-mail addresses Supported API: true |
void |
sendEmail(InternetAddress[] recipients,
String subject,
Emailer.EmailContentProvider contents,
String fromAddress)
Send e-mail to array of e-mail addresses Supported API: true |
void |
sendEmail(String toEmailAddresses,
String subject,
Emailer.EmailContentProvider contents)
Send e-mail to a list of e-mail addresses Supported API: true |
void |
sendEmailToAddressesOrList(String addressesOrEmailList,
String subject,
Emailer.EmailContentProvider contents)
Send e-mail to an e-mail address or list Supported API: true |
void |
sendEmailToList(String toEmailListName,
String subject,
Emailer.EmailContentProvider contents)
Send e-mail to e-mail list Supported API: true |
| Methods inherited from class wt.jmx.core.SelfAwareMBean |
|---|
deregister, destroy, getBaseObjectName, getObjectName, getObjectNameOnPreRegister, getOwnerMBean, getSelfAwareMBean, init, isInited, isRegistered, isStarted, onDestroy, onInit, postDeregister, postRegister, preDeregister, preRegister, register, register, register, resetObjectName, setOwnerMBean, start, stop |
| Methods inherited from class wt.jmx.core.StandardMBean |
|---|
cacheMBeanInfo, cacheMBeanInfoInInstance, createMBeanInfo, emailThisMBean, getCachedInstanceMBeanInfo, getCachedMBeanInfo, getDescription, getDescription, getDescription, getDescription, getImpact, getMBeanInfo, getParameterName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean |
|---|
emailThisMBean |
| Method Detail |
|---|
public static Emailer getInstance(StandardMBean mbeanContext,
boolean throwExceptionOnNoInstance)
mbeanContext - MBean to use as a lookup context for the given MBean (currently ignored unless SelfAwareMBean)throwExceptionOnNoInstance - Whether a NullPointerException should be thrown when no started instance is available
public void sendEmailToAddressesOrList(String addressesOrEmailList,
String subject,
Emailer.EmailContentProvider contents)
throws IllegalArgumentException
addressesOrEmailList - List of e-mail addresses or name of e-mail list to send e-mail tosubject - Subject of e-mailcontents - Contents of e-mail
IllegalArgumentException
public void sendEmail(String toEmailAddresses,
String subject,
Emailer.EmailContentProvider contents)
throws IllegalArgumentException
toEmailAddresses - List of e-mail addresses to send e-mail tosubject - Subject of e-mailcontents - Contents of e-mail
IllegalArgumentException
public void sendEmailToList(String toEmailListName,
String subject,
Emailer.EmailContentProvider contents)
throws IllegalArgumentException
toEmailListName - E-mail list to send e-mail tosubject - Subject of e-mailcontents - Contents of e-mail
IllegalArgumentException
public void sendEmail(InternetAddress[] recipients,
String subject,
Emailer.EmailContentProvider contents)
throws IllegalArgumentException
recipients - Array of e-mail addresses to send e-mail tosubject - Subject of e-mailcontents - Contents of e-mail
IllegalArgumentException
public void sendEmail(InternetAddress[] recipients,
String subject,
Emailer.EmailContentProvider contents,
String fromAddress)
throws IllegalArgumentException
recipients - Array of e-mail addresses to send e-mail tosubject - Subject of e-mailcontents - Contents of e-mailfromAddress - From address for this e-mail; will use FromAddress attribute if this is null/unspecified
IllegalArgumentException
public void emailZipOfFiles(URL baseURL,
URL[] urls,
String addressesOrEmailList,
String subject)
throws IOException
baseURL - Base URL which jar entry names are formed relative to, must be parent URL to all other URLs specifiedurls - URLs of filesaddressesOrEmailList - List of e-mail addresses or name of e-mail list to send e-mail tosubject - Subject to give e-mail
IOException
public void emailTextFile(File file,
String addressesOrEmailList,
String subject,
long maxLines,
long maxChars)
throws IOException
file - File to e-mailaddressesOrEmailList - List of e-mail addresses or name of e-mail list to send e-mail tosubject - Subject to give e-mailmaxLines - Maximum number of lines to include; non-positive numbers imply no limitmaxChars - Maximum number of characters to include; non-positive numbers imply no limit
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||