Interface EmailerMBean
- All Superinterfaces:
SelfEmailingMBean
- All Known Implementing Classes:
Emailer
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionaddEmailList(String emailListName) Add a EmailList MBean (unless it already exists) and returns its ObjectName
Supported API: truevoidE-mail entire file as an attachment, optionally compressing it.voidemailLogsDirs(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: truevoidemailLogsDirs(String addressesOrEmailList, String subject, boolean oneMessagePerFile, int maxAgeInDays, int minAgeInDays, String matchingExpression, String[] logsDirViewersToSkip) For each LogsDirViewer MBean, e-mail log files from its target log directory filtering by the specified file age
Supported API: truevoidemailTextFile(String fileRef, String addressesOrEmailList, String subject, long maxLines, long maxChars) E-mail last portion of text file.voidemailThreadInfo(long threadId, String addressesOrEmailList, String subject) E-mails detailed information on the given thread
Supported API: trueString[]getEmailAddressesForList(String emailListName) Get list of e-mail addresses for a given e-mail list name
Supported API: trueString[]Names of e-mail lists
Supported API: truelongNumber of requests to send e-mail via this MBean
Supported API: trueintNumber of attempts made to send an e-mail before giving up
Supported API: trueintNumber of seconds between retry attempts to send e-mail
Supported API: truebooleanWhether TLS (transport layer security) should be enabled via STARTTLS
Supported API: truelongNumber of e-mail send failures
Supported API: trueMail address used in the "From" field of e-mail messages sent
Supported API: trueName of logger
Supported API: trueLog level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)
Supported API: trueMail protocol
Supported API: trueMail server host name
Supported API: trueintMail server port
Supported API: trueintMaximum number of threads to allow in e-mailing thread pool
Supported API: truelongNumber of e-mail send successes
Supported API: truevoidremoveEmailList(String emailListName) Remove an EmailList MBean by name (if it exists)
Supported API: truevoidsetEmailSendRetries(int emailSendRetries) Number of attempts made to send an e-mail before giving up
Supported API: truevoidsetEmailSendRetrySeconds(int emailSendRetrySeconds) Number of seconds between retry attempts to send e-mail
Supported API: truevoidsetEnableTLS(boolean enableTLS) Whether TLS (transport layer security) should be enabled via STARTTLS
Supported API: truevoidsetFromAddress(String fromAddress) Mail address used in the "From" field of e-mail messages sent
Supported API: truevoidsetLogLevel(String logLevel) Log level (not persisted with MBean); valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)
Supported API: truevoidsetMailProtocol(String mailProtocol) Mail protocol
Supported API: truevoidsetMailServer(String mailServer) Mail server host name
Supported API: truevoidsetMailServerPassword(String mailServerPassword) Password used to authenticate with e-mail server
Supported API: truevoidsetMailServerPort(int mailServerPort) Mail server port
Supported API: truevoidsetMailServerUsername(String mailServerUsername) User name used to authenticate with e-mail server
Supported API: truevoidsetMaximumPoolSize(int maximumPoolSize) Maximum number of threads to allow in e-mailing thread pool
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
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
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 -
getMailProtocol
String getMailProtocol()Mail protocol
Supported API: true -
setMailProtocol
Mail protocol
Supported API: true -
getMailServer
String getMailServer()Mail server host name
Supported API: true -
getEnableTLS
boolean getEnableTLS()Whether TLS (transport layer security) should be enabled via STARTTLS
Supported API: true -
setEnableTLS
void setEnableTLS(boolean enableTLS) Whether TLS (transport layer security) should be enabled via STARTTLS
Supported API: true -
setMailServer
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
Mail address used in the "From" field of e-mail messages sent
Supported API: true -
setMailServerUsername
User name used to authenticate with e-mail server
Supported API: true -
setMailServerPassword
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
Get list of e-mail addresses for a given e-mail list name
Supported API: true- Parameters:
emailListName- Name of e-mail list
-
addEmailList
Add a EmailList MBean (unless it already exists) and returns its ObjectName
Supported API: true- Parameters:
emailListName- Name of e-mail list
-
removeEmailList
Remove an EmailList MBean by name (if it exists)
Supported API: true- Parameters:
emailListName- Name of e-mail list
-
emailFile
@MBeanOperationImpact(2) 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-mailaddressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mailcompress- Whether to compress the file attachment- Throws:
IOException
-
emailTextFile
@MBeanOperationImpact(2) 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-mailaddressesOrEmailList- Comma-delimited 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- Throws:
IOException
-
emailThreadInfo
@MBeanOperationImpact(0) 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 threadaddressesOrEmailList- Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail tosubject- Subject to give e-mail- Throws:
IOExceptionSAXException
-
emailLogsDirs
@MBeanOperationImpact(0) 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 tosubject- Subject to give e-mailoneMessagePerFile- Whether to send a separate e-mail message for each filemaxAgeInDays- Maximum age in days (by modification date) of files to e-mailminAgeInDays- Minimum age in days (by modification date) of files to e-mail; ignored when less than or equal to zeromatchingExpression- Regular expression file names must match to be e-mailed; ignored if empty or null- Throws:
IOException
-
emailLogsDirs
@MBeanOperationImpact(0) void emailLogsDirs(String addressesOrEmailList, String subject, boolean oneMessagePerFile, int maxAgeInDays, int minAgeInDays, String matchingExpression, String[] logsDirViewersToSkip) 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 tosubject- Subject to give e-mailoneMessagePerFile- Whether to send a separate e-mail message for each filemaxAgeInDays- Maximum age in days (by modification date) of files to e-mailminAgeInDays- Minimum age in days (by modification date) of files to e-mail; ignored when less than or equal to zeromatchingExpression- Regular expression file names must match to be e-mailed; ignored if empty or nulllogsDirViewersToSkip- Names of LogsDirViewer MBeans to skip- Throws:
IOException
-