wt.jmx.core.mbeans
Interface NotificationHandlerMBean

All Superinterfaces:
InfoMBean, SelfEmailingMBean

public interface NotificationHandlerMBean
extends InfoMBean

Listen for a specified notification and log and/or e-mail data whenever the notification in question occurs

Supported API: true

Extendable: true


Method Summary
 void addTargetInfoItem(String mbeanAttributeName, String displayName)
          Add item to end of list of those to be obtained upon receipt of a notification; similar to addMBeanInfo(), but always targets the MBean from which the notification was received

Supported API: true
 void emailXsltStylesheet(String addressesOrEmailList, String subject)
          E-mail XSLT stylesheet

Supported API: true
 String getAttributeChangeTargets()
          Attributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute

Supported API: true
 String getCustomDelegateFactoryClass()
          Name of custom delegate factory class; must implement NotificationHandlerDelegateFactory

Supported API: true
 String getEmailRecipientListName()
          Name of e-mail list to send e-mail to upon receipt of notification; no e-mail is sent if this is unspecified or invalid

Supported API: true
 int getEmailSendLimit()
          Maximum number of e-mails sent without a reset; unlimited if less than or equal to zero

Supported API: true
 int getEmailsSent()
          Number of e-mails sent since last reset

Supported API: true
 String getEmailSubject()
          Subject of e-mail sent upon receipt of notification

Supported API: true
 String getFormatString()
          Low-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString

Supported API: true
 String getIgnoredNotificationTypes()
          Notification types for which this MBean will not be notified; useful to listen to all but a few notification types

Supported API: true
 String[] getInfoItemsPreview()
          String preview representation of data currently selected by info items; for any items referencing the implicit target MBean a sample MBean matching TargetObjectName (if such an MBean is currently registered) is used for purposes of generating this preview

Supported API: true
 String getLogAsLevel()
          Level to assign to generated log messages; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified); see LoggerLevel also

Supported API: true
 String getLogger()
          Logger to output data to upon receipt of notification; if not specified, no such logging is performed

Supported API: true
 String getLoggerLevel()
          Cutoff level for logger; must be at least as high as LogAsLevel for log to be produced; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 String getLoggerOutputAttributes()
          List of data attributes to be output to log upon receipt of notification

Supported API: true
 String[] getLoggerOutputAttributesSupported()
          List of attributes always supported for use in LoggerOutputAttributes; all bean properties of the notification are exposed as well

Supported API: true
 String getName()
          Name of NotificationHandlerMBean

Supported API: true
 int getNumberMBeansListenedTo()
          Number of MBeans currently being listened to

Supported API: true
 String getSeparatorString()
          Item separator string used in log format

Supported API: true
 String getTargetNotificationTypes()
          Notification types for which this MBean will be notified; if not specified, will be notified for all types not specified by IgnoredNotificationTypes

Supported API: true
 ObjectName getTargetObjectName()
          ObjectName (or ObjectName pattern) of MBean to listen to for notifications

Supported API: true
 Number getTargetThreshold()
          Value of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true
 String getTargetThresholdAttribute()
          Name of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true
 String getXsltStylesheet()
          URL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content

Supported API: true
 String getXsltStylesheetURLString()
          XsltStylesheet as an absolute URL reference

Supported API: true
 void insertTargetInfoItem(int infoItemIdx, String mbeanAttributeName, String displayName)
          Insert item into list of those to be obtained upon receipt of a notification; similar to insertMBeanInfo(), but always targets the MBean from which the notification was received

Supported API: true
 boolean isUseShortFormat()
          Whether short format (which contains only attribute values, not names) is used for logging

Supported API: true
 void remove()
          Disable this e-mail notifier and remove it from the management console

Supported API: true
 void resetEmailsSent()
          Resets EmailsSent

Supported API: true
 void setAttributeChangeTargets(String attributeChangeTargets)
          Attributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute

Supported API: true
 void setCustomDelegateFactoryClass(String customDelegateFactoryClassname)
          Name of custom delegate factory class; must implement NotificationHandlerDelegateFactory
 void setEmailRecipientListName(String emailRecipientListName)
          Name of e-mail list to send e-mail to upon receipt of notification; no e-mail is sent if this is unspecified or invalid

Supported API: true
 void setEmailSendLimit(int emailSendLimit)
          Maximum number of e-mails sent without a reset; unlimited if less than or equal to zero

Supported API: true
 void setEmailSubject(String emailSubject)
          Subject of e-mail sent upon receipt of notification

Supported API: true
 void setFormatString(String formatString)
          Low-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString

Supported API: true
 void setIgnoredNotificationTypes(String ignoredNotificationTypes)
          Notification types for which this MBean will be notified; useful to listen to all but a few notification types

Supported API: true
 void setLogAsLevel(String logAsLevel)
          Level to assign to generated log messages; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified); see LoggerLevel also

Supported API: true
 void setLogger(String loggerName)
          Logger to output data to upon receipt of notification; if not specified, no such logging is performed

Supported API: true
 void setLoggerLevel(String level)
          Cutoff level for logger; must be at least as high as LogAsLevel for log to be produced; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true
 void setLoggerOutputAttributes(String loggerOutputAttributes)
          List of data attributes to be output to log upon receipt of notification

Supported API: true
 void setSeparatorString(String separatorString)
          Item separator string used in log format

Supported API: true
 void setTargetNotificationTypes(String targetNotificationTypes)
          Notification types for which this MBean will be notified; if not specified, will be notified for all types not specified by IgnoredNotificationTypes

Supported API: true
 void setTargetThreshold(Number targetThreshold)
          Value of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true
 void setTargetThresholdAttribute(String targetThresholdAttribute)
          Name of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true
 void setUseShortFormat(boolean useShortFormat)
          Whether short format (which contains only attribute values, not names) is used for logging

Supported API: true
 void setXsltStylesheet(String xsltStylesheet)
          URL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content

Supported API: true
 String[] viewXsltStylesheet()
          View XSLT stylesheet

Supported API: true
 
Methods inherited from interface wt.jmx.core.mbeans.InfoMBean
addInfoItem, changeInfoItemDisplayName, getInfoItemsAsOpenData, getInfoItemsAsStrings, insertInfoItem, removeInfoItem, removeInfoItems
 
Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
 

Method Detail

getName

String getName()
Name of NotificationHandlerMBean

Supported API: true


getTargetObjectName

ObjectName getTargetObjectName()
ObjectName (or ObjectName pattern) of MBean to listen to for notifications

Supported API: true


getNumberMBeansListenedTo

int getNumberMBeansListenedTo()
Number of MBeans currently being listened to

Supported API: true


getTargetThresholdAttribute

String getTargetThresholdAttribute()
Name of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true


setTargetThresholdAttribute

void setTargetThresholdAttribute(String targetThresholdAttribute)
Name of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true


getTargetThreshold

Number getTargetThreshold()
Value of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true


setTargetThreshold

void setTargetThreshold(Number targetThreshold)
Value of threshold attribute on target MBean to set as part of listener registration (optional)

Supported API: true


getAttributeChangeTargets

String getAttributeChangeTargets()
Attributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute

Supported API: true


setAttributeChangeTargets

void setAttributeChangeTargets(String attributeChangeTargets)
Attributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute

Supported API: true


getTargetNotificationTypes

String getTargetNotificationTypes()
Notification types for which this MBean will be notified; if not specified, will be notified for all types not specified by IgnoredNotificationTypes

Supported API: true


setTargetNotificationTypes

void setTargetNotificationTypes(String targetNotificationTypes)
Notification types for which this MBean will be notified; if not specified, will be notified for all types not specified by IgnoredNotificationTypes

Supported API: true


getIgnoredNotificationTypes

String getIgnoredNotificationTypes()
Notification types for which this MBean will not be notified; useful to listen to all but a few notification types

Supported API: true


setIgnoredNotificationTypes

void setIgnoredNotificationTypes(String ignoredNotificationTypes)
Notification types for which this MBean will be notified; useful to listen to all but a few notification types

Supported API: true


getEmailRecipientListName

String getEmailRecipientListName()
Name of e-mail list to send e-mail to upon receipt of notification; no e-mail is sent if this is unspecified or invalid

Supported API: true


setEmailRecipientListName

void setEmailRecipientListName(String emailRecipientListName)
Name of e-mail list to send e-mail to upon receipt of notification; no e-mail is sent if this is unspecified or invalid

Supported API: true


getEmailSubject

String getEmailSubject()
Subject of e-mail sent upon receipt of notification

Supported API: true


setEmailSubject

void setEmailSubject(String emailSubject)
Subject of e-mail sent upon receipt of notification

Supported API: true


getXsltStylesheetURLString

String getXsltStylesheetURLString()
XsltStylesheet as an absolute URL reference

Supported API: true


getXsltStylesheet

String getXsltStylesheet()
URL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content

Supported API: true


setXsltStylesheet

void setXsltStylesheet(String xsltStylesheet)
URL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content

Supported API: true


getLogger

String getLogger()
Logger to output data to upon receipt of notification; if not specified, no such logging is performed

Supported API: true


setLogger

void setLogger(String loggerName)
Logger to output data to upon receipt of notification; if not specified, no such logging is performed

Supported API: true


getLogAsLevel

String getLogAsLevel()
Level to assign to generated log messages; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified); see LoggerLevel also

Supported API: true


setLogAsLevel

void setLogAsLevel(String logAsLevel)
Level to assign to generated log messages; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified); see LoggerLevel also

Supported API: true


getLoggerLevel

String getLoggerLevel()
Cutoff level for logger; must be at least as high as LogAsLevel for log to be produced; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


setLoggerLevel

void setLoggerLevel(String level)
Cutoff level for logger; must be at least as high as LogAsLevel for log to be produced; valid values are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (or blank/unspecified)

Supported API: true


getLoggerOutputAttributes

String getLoggerOutputAttributes()
List of data attributes to be output to log upon receipt of notification

Supported API: true


setLoggerOutputAttributes

void setLoggerOutputAttributes(String loggerOutputAttributes)
List of data attributes to be output to log upon receipt of notification

Supported API: true


getLoggerOutputAttributesSupported

String[] getLoggerOutputAttributesSupported()
List of attributes always supported for use in LoggerOutputAttributes; all bean properties of the notification are exposed as well

Supported API: true


isUseShortFormat

boolean isUseShortFormat()
Whether short format (which contains only attribute values, not names) is used for logging

Supported API: true


setUseShortFormat

void setUseShortFormat(boolean useShortFormat)
Whether short format (which contains only attribute values, not names) is used for logging

Supported API: true


getSeparatorString

String getSeparatorString()
Item separator string used in log format

Supported API: true


setSeparatorString

void setSeparatorString(String separatorString)
Item separator string used in log format

Supported API: true


getFormatString

String getFormatString()
Low-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString

Supported API: true


setFormatString

void setFormatString(String formatString)
Low-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString

Supported API: true


getEmailSendLimit

int getEmailSendLimit()
Maximum number of e-mails sent without a reset; unlimited if less than or equal to zero

Supported API: true


setEmailSendLimit

void setEmailSendLimit(int emailSendLimit)
Maximum number of e-mails sent without a reset; unlimited if less than or equal to zero

Supported API: true


getEmailsSent

int getEmailsSent()
Number of e-mails sent since last reset

Supported API: true


getInfoItemsPreview

String[] getInfoItemsPreview()
String preview representation of data currently selected by info items; for any items referencing the implicit target MBean a sample MBean matching TargetObjectName (if such an MBean is currently registered) is used for purposes of generating this preview

Supported API: true

Specified by:
getInfoItemsPreview in interface InfoMBean

getCustomDelegateFactoryClass

String getCustomDelegateFactoryClass()
Name of custom delegate factory class; must implement NotificationHandlerDelegateFactory

Supported API: true


setCustomDelegateFactoryClass

void setCustomDelegateFactoryClass(String customDelegateFactoryClassname)
                                   throws ClassCastException,
                                          ClassNotFoundException,
                                          IllegalAccessException,
                                          InstantiationException
Name of custom delegate factory class; must implement NotificationHandlerDelegateFactory

If the class indicated by 'customDelegateFactoryClassname' extends SelfAwareMBean, then an instance of the class will be registered and managed as a child of this MBean.

Supported API: true

Throws:
ClassCastException
ClassNotFoundException
IllegalAccessException
InstantiationException

addTargetInfoItem

void addTargetInfoItem(String mbeanAttributeName,
                       String displayName)
Add item to end of list of those to be obtained upon receipt of a notification; similar to addMBeanInfo(), but always targets the MBean from which the notification was received

Supported API: true

Parameters:
mbeanAttributeName - Name of attribute in 'mbeanObjectName' to obtain; can use .itemName-style suffixes to select CompositeData fields
displayName - Display name to use for this item; used when UseShortFormat is false and FormatString is unspecified

insertTargetInfoItem

void insertTargetInfoItem(int infoItemIdx,
                          String mbeanAttributeName,
                          String displayName)
Insert item into list of those to be obtained upon receipt of a notification; similar to insertMBeanInfo(), but always targets the MBean from which the notification was received

Supported API: true

Parameters:
infoItemIdx - Index of item to insert in front of
mbeanAttributeName - Name of attribute in 'mbeanObjectName' to obtain; can use .itemName-style suffixes to select CompositeData fields
displayName - Display name to use for this item; used when UseShortFormat is false and FormatString is unspecified

resetEmailsSent

void resetEmailsSent()
Resets EmailsSent

Supported API: true


remove

void remove()
Disable this e-mail notifier and remove it from the management console

Supported API: true


viewXsltStylesheet

String[] viewXsltStylesheet()
                            throws IOException
View XSLT stylesheet

Supported API: true

Throws:
IOException

emailXsltStylesheet

void emailXsltStylesheet(String addressesOrEmailList,
                         String subject)
                         throws IOException
E-mail XSLT stylesheet

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
Throws:
IOException