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

    Modifier and Type
    Method
    Description
    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
    emailLogsDirs(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: 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
    Get list of e-mail addresses for a given e-mail list name

    Supported API: true
    Names of e-mail lists

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

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

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

    Supported API: true
    boolean
    Whether TLS (transport layer security) should be enabled via STARTTLS

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

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

    Supported API: true
    Name of logger

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

    Supported API: true
    Mail protocol

    Supported API: true
    Mail server host name

    Supported API: true
    int
    Mail server port

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

    Supported API: true
    long
    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
    setEnableTLS(boolean enableTLS)
    Whether TLS (transport layer security) should be enabled via STARTTLS

    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
    setMailProtocol(String mailProtocol)
    Mail protocol

    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 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

      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
    • getMailProtocol

      String getMailProtocol()
      Mail protocol

      Supported API: true
    • setMailProtocol

      void setMailProtocol(String mailProtocol)
      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

      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

      @MBeanOperationImpact(0) 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

      @MBeanOperationImpact(1) 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

      @MBeanOperationImpact(1) void removeEmailList(String emailListName)
      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-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 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-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

      @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 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

      @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 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
    • 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 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
      logsDirViewersToSkip - Names of LogsDirViewer MBeans to skip
      Throws:
      IOException