wt.jmx.core.mbeans
Interface EmailerMBean

All Superinterfaces:
SelfEmailingMBean
All Known Implementing Classes:
Emailer

public interface EmailerMBean
extends SelfEmailingMBean

Provides e-mail configuration and back-end capabilities to other MBeans

Supported API: true

Extendable: true


Method Summary
 String addEmailList(String emailListName)
          Add a EmailList MBean (unless it already exists) and returns its ObjectName

Supported API: true
 void emailFile(String fileRef, String addressesOrEmailList, String subject, boolean compress)
          E-mail entire file as an attachment, optionally compressing it.
 void emailLogsDirs(String addressesOrEmailList, String subject, boolean oneMessagePerFile, int maxAgeInDays, int minAgeInDays, String matchingExpression)
          For each LogsDirViewer MBean, e-mail log files from its target log directory filtering by the specified file age

Supported API: true
 void emailTextFile(String fileRef, String addressesOrEmailList, String subject, long maxLines, long maxChars)
          E-mail last portion of text file.
 void emailThreadInfo(long threadId, String addressesOrEmailList, String subject)
          E-mails detailed information on the given thread

Supported API: true
 String[] getEmailAddressesForList(String emailListName)
          Get list of e-mail addresses for a given e-mail list name

Supported API: true
 String[] getEmailListNames()
          Names of e-mail lists

Supported API: true
 long getEmailRequests()
          Number of requests to send e-mail via this MBean

Supported API: true
 int getEmailSendRetries()
          Number of attempts made to send an e-mail before giving up

Supported API: true
 int getEmailSendRetrySeconds()
          Number of seconds between retry attempts to send e-mail

Supported API: true
 long getFailures()
          Number of e-mail send failures

Supported API: true
 String getFromAddress()
          Mail address used in the "From" field of e-mail messages sent

Supported API: true
 String getLogger()
          Name of logger

Supported API: true
 String getLogLevel()
          Log level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 String getMailServer()
          Mail server host name

Supported API: true
 int getMailServerPort()
          Mail server port

Supported API: true
 int getMaximumPoolSize()
          Maximum number of threads to allow in e-mailing thread pool

Supported API: true
 long getSuccesses()
          Number of e-mail send successes

Supported API: true
 void removeEmailList(String emailListName)
          Remove an EmailList MBean by name (if it exists)

Supported API: true
 void setEmailSendRetries(int emailSendRetries)
          Number of attempts made to send an e-mail before giving up

Supported API: true
 void setEmailSendRetrySeconds(int emailSendRetrySeconds)
          Number of seconds between retry attempts to send e-mail

Supported API: true
 void setFromAddress(String fromAddress)
          Mail address used in the "From" field of e-mail messages sent

Supported API: true
 void setLogLevel(String logLevel)
          Log level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 void setMailServer(String mailServer)
          Mail server host name

Supported API: true
 void setMailServerPassword(String mailServerPassword)
          Password used to authenticate with e-mail server

Supported API: true
 void setMailServerPort(int mailServerPort)
          Mail server port

Supported API: true
 void setMailServerUsername(String mailServerUsername)
          User name used to authenticate with e-mail server

Supported API: true
 void setMaximumPoolSize(int maximumPoolSize)
          Maximum number of threads to allow in e-mailing thread pool

Supported API: true
 
Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
 

Method Detail

getLogger

String getLogger()
Name of logger

Supported API: true


getLogLevel

String getLogLevel()
Log level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


setLogLevel

void setLogLevel(String logLevel)
Log level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


getEmailRequests

long getEmailRequests()
Number of requests to send e-mail via this MBean

Supported API: true


getSuccesses

long getSuccesses()
Number of e-mail send successes

Supported API: true


getFailures

long getFailures()
Number of e-mail send failures

Supported API: true


getMailServer

String getMailServer()
Mail server host name

Supported API: true


setMailServer

void setMailServer(String mailServer)
Mail server host name

Supported API: true


getMailServerPort

int getMailServerPort()
Mail server port

Supported API: true


setMailServerPort

void setMailServerPort(int mailServerPort)
Mail server port

Supported API: true


getFromAddress

String getFromAddress()
Mail address used in the "From" field of e-mail messages sent

Supported API: true


setFromAddress

void setFromAddress(String fromAddress)
Mail address used in the "From" field of e-mail messages sent

Supported API: true


setMailServerUsername

void setMailServerUsername(String mailServerUsername)
User name used to authenticate with e-mail server

Supported API: true


setMailServerPassword

void setMailServerPassword(String mailServerPassword)
Password used to authenticate with e-mail server

Supported API: true


getEmailSendRetries

int getEmailSendRetries()
Number of attempts made to send an e-mail before giving up

Supported API: true


setEmailSendRetries

void setEmailSendRetries(int emailSendRetries)
Number of attempts made to send an e-mail before giving up

Supported API: true


getEmailSendRetrySeconds

int getEmailSendRetrySeconds()
Number of seconds between retry attempts to send e-mail

Supported API: true


setEmailSendRetrySeconds

void setEmailSendRetrySeconds(int emailSendRetrySeconds)
Number of seconds between retry attempts to send e-mail

Supported API: true


getMaximumPoolSize

int getMaximumPoolSize()
Maximum number of threads to allow in e-mailing thread pool

Supported API: true


setMaximumPoolSize

void setMaximumPoolSize(int maximumPoolSize)
Maximum number of threads to allow in e-mailing thread pool

Supported API: true


getEmailListNames

String[] getEmailListNames()
Names of e-mail lists

Supported API: true


getEmailAddressesForList

String[] getEmailAddressesForList(String emailListName)
Get list of e-mail addresses for a given e-mail list name

Supported API: true

Parameters:
emailListName - Name of e-mail list

addEmailList

String addEmailList(String emailListName)
Add a EmailList MBean (unless it already exists) and returns its ObjectName

Supported API: true

Parameters:
emailListName - Name of e-mail list

removeEmailList

void removeEmailList(String emailListName)
Remove an EmailList MBean by name (if it exists)

Supported API: true

Parameters:
emailListName - Name of e-mail list

emailFile

void emailFile(String fileRef,
               String addressesOrEmailList,
               String subject,
               boolean compress)
               throws IOException
E-mail entire file as an attachment, optionally compressing it.

Note that this operation is considered to have an ACTION_INFO (i.e. "read and write") impact even though it does not change any server state. This is due to the fact that it can be used to e-mail any file readable by the given process, including files which may contain sensitive information such as passwords. This operation is thus restricted to those users with the broadest possible access and privileges.

Supported API: true

Parameters:
fileRef - Reference (URL, file, or resource) to file to e-mail
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
compress - Whether to compress the file attachement
Throws:
IOException

emailTextFile

void emailTextFile(String fileRef,
                   String addressesOrEmailList,
                   String subject,
                   long maxLines,
                   long maxChars)
                   throws IOException
E-mail last portion of text file.

Note that this operation is considered to have an ACTION_INFO (i.e. "read and write") impact even though it does not change any server state. This is due to the fact that it can be used to e-mail any text file readable by the given process, including files which may contain sensitive information such as passwords. This operation is thus restricted to those users with the broadest possible access and privileges.

Supported API: true

Parameters:
fileRef - Reference (URL, file, or resource) to file to e-mail
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
maxLines - Maximum number of lines to include; non-positive numbers imply no limit
maxChars - Maximum number of characters to include; non-positive numbers imply no limit
Throws:
IOException

emailThreadInfo

void emailThreadInfo(long threadId,
                     String addressesOrEmailList,
                     String subject)
                     throws IOException,
                            SAXException
E-mails detailed information on the given thread

Supported API: true

Parameters:
threadId - Id of target thread
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
Throws:
IOException
SAXException

emailLogsDirs

void emailLogsDirs(String addressesOrEmailList,
                   String subject,
                   boolean oneMessagePerFile,
                   int maxAgeInDays,
                   int minAgeInDays,
                   String matchingExpression)
                   throws IOException
For each LogsDirViewer MBean, e-mail log files from its target log directory filtering by the specified file age

Supported API: true

Parameters:
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
oneMessagePerFile - Whether to send a separate e-mail message for each file
maxAgeInDays - Maximum age in days (by modification date) of files to e-mail
minAgeInDays - Minimum age in days (by modification date) of files to e-mail; ignored when less than or equal to zero
matchingExpression - Regular expression file names must match to be e-mailed; ignored if empty or null
Throws:
IOException