Interface NotificationHandlerMBean
- All Superinterfaces:
InfoMBean,SelfEmailingMBean
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomDelegateFactory(String factoryName, String factoryClass) Add custom delegate factory instance and associate it with the given name.voidaddTargetInfoItem(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: truevoidemailXsltStylesheet(String addressesOrEmailList, String subject) E-mail XSLT stylesheet
Supported API: trueAttributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute
Supported API: trueName 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: trueintMaximum number of e-mails sent without a reset; unlimited if less than or equal to zero
Supported API: trueintNumber of e-mails sent since last reset
Supported API: trueSubject of e-mail sent upon receipt of notification; if this is unspecified, then a default subject will be generated from the notification
Supported API: trueLow-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString
Supported API: trueNotification types for which this MBean will not be notified; useful to listen to all but a few notification types
Supported API: trueString[]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: trueLevel 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: trueLogger to output data to upon receipt of notification; if not specified, no such logging is performed
Supported API: trueCutoff 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: trueList of data attributes to be output to log upon receipt of notification
Supported API: trueString[]List of attributes always supported for use in LoggerOutputAttributes; all bean properties of the notification are exposed as well
Supported API: truegetName()Name of NotificationHandlerMBean
Supported API: trueintNumber of MBeans currently being listened to
Supported API: trueItem separator string used in log format
Supported API: trueNotification types for which this MBean will be notified; if not specified, will be notified for all types not specified by IgnoredNotificationTypes
Supported API: trueObjectName (or ObjectName pattern) of MBean to listen to for notifications
Supported API: trueValue of threshold attribute on target MBean to set as part of listener registration (optional)
Supported API: trueName of threshold attribute on target MBean to set as part of listener registration (optional)
Supported API: trueURL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content
Supported API: trueXsltStylesheet as an absolute URL reference
Supported API: truevoidinsertTargetInfoItem(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: truebooleanWhether multi-line format is used
Supported API: truebooleanWhether short format (which contains only attribute values, not names) is used for logging
Supported API: truevoidremove()Disable this e-mail notifier and remove it from the management console
Supported API: truevoidResets EmailsSent
Supported API: truevoidsetAttributeChangeTargets(String attributeChangeTargets) Attributes for which this MBean will be notified upon an AttributeChangeNotification; if not specified, notification is performed for any attribute
Supported API: truevoidsetEmailRecipientListName(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: truevoidsetEmailSendLimit(int emailSendLimit) Maximum number of e-mails sent without a reset; unlimited if less than or equal to zero
Supported API: truevoidsetEmailSubject(String emailSubject) Subject of e-mail sent upon receipt of notification; if this is unspecified, then a default subject will be generated from the notification
Supported API: truevoidsetFormatString(String formatString) Low-level (java.util.Formatter) log format string; if specified, overrides UseShortFormat and SeparatorString
Supported API: truevoidsetIgnoredNotificationTypes(String ignoredNotificationTypes) Notification types for which this MBean will be notified; useful to listen to all but a few notification types
Supported API: truevoidsetLogAsLevel(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: truevoidLogger to output data to upon receipt of notification; if not specified, no such logging is performed
Supported API: truevoidsetLoggerLevel(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: truevoidsetLoggerOutputAttributes(String loggerOutputAttributes) List of data attributes to be output to log upon receipt of notification
Supported API: truevoidsetMultiLineFormat(boolean multiLineFormat) Whether multi-line format is used
Supported API: truevoidsetSeparatorString(String separatorString) Item separator string used in log format
Supported API: truevoidsetTargetNotificationTypes(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: truevoidsetTargetThreshold(Number targetThreshold) Value of threshold attribute on target MBean to set as part of listener registration (optional)
Supported API: truevoidsetTargetThresholdAttribute(String targetThresholdAttribute) Name of threshold attribute on target MBean to set as part of listener registration (optional)
Supported API: truevoidsetUseShortFormat(boolean useShortFormat) Whether short format (which contains only attribute values, not names) is used for logging
Supported API: truevoidsetXsltStylesheet(String xsltStylesheet) URL, file, or resource reference of XSLT stylesheet to apply to XML data to produce e-mail content
Supported API: trueString[]View XSLT stylesheet
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.InfoMBean
addInfoItem, changeInfoItemDisplayName, getCustomDelegateFactoryClass, getCustomDelegateFactoryData, getCustomDelegateFactoryNames, getInfoItemsAsOpenData, getInfoItemsAsStrings, insertInfoItem, removeCustomDelegateFactory, removeInfoItem, removeInfoItems, setCustomDelegateFactoryClassMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
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
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
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
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
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
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
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; if this is unspecified, then a default subject will be generated from the notification
Supported API: true -
setEmailSubject
Subject of e-mail sent upon receipt of notification; if this is unspecified, then a default subject will be generated from the 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
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
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
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
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
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 -
isMultiLineFormat
boolean isMultiLineFormat()Whether multi-line format is used
Supported API: true -
setMultiLineFormat
void setMultiLineFormat(boolean multiLineFormat) Whether multi-line format is used
Supported API: true -
getSeparatorString
String getSeparatorString()Item separator string used in log format
Supported API: true -
setSeparatorString
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
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:
getInfoItemsPreviewin interfaceInfoMBean
-
addTargetInfoItem
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 fieldsdisplayName- Display name to use for this item; used when UseShortFormat is false and FormatString is unspecified
-
insertTargetInfoItem
@MBeanOperationImpact(1) 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 ofmbeanAttributeName- Name of attribute in 'mbeanObjectName' to obtain; can use .itemName-style suffixes to select CompositeData fieldsdisplayName- Display name to use for this item; used when UseShortFormat is false and FormatString is unspecified
-
resetEmailsSent
Resets EmailsSent
Supported API: true -
viewXsltStylesheet
View XSLT stylesheet
Supported API: true- Throws:
IOException
-
emailXsltStylesheet
@MBeanOperationImpact(0) 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 tosubject- Subject to give e-mail- Throws:
IOException
-
addCustomDelegateFactory
@MBeanOperationImpact(1) void addCustomDelegateFactory(String factoryName, String factoryClass) throws ClassNotFoundException, InstantiationException, IllegalAccessException Add custom delegate factory instance and associate it with the given name.An attempt is made to find a constructor in the specified class taking a single String argument and call this constructor passing the specified name. If this fails, the no-arg constructor (which must be public) is used instead and an attempt is also made to call setName(String) on the instance. An attempt is also made to call setOwnerMBean(BaseObjectNamed) on the instance, passing it this MBean, so that any interested delegate factory can obtain this information.
If the factory is a
SelfAwareMBean, then the factory is registered as a child MBean of this MBean.The factory class must implement
NotificationHandlerDelegateFactory. The factory class should also override equals() to return 'true' for logically equivalent instances.
Supported API: true- Specified by:
addCustomDelegateFactoryin interfaceInfoMBean- Parameters:
factoryName- Name to associate with custom delegate factory; will use factoryClass if this is nullfactoryClass- Name of custom delegate factory class; class must implement NotificationHandlerDelegateFactory- Throws:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
remove
Disable this e-mail notifier and remove it from the management console
Supported API: true
-