public class JMXAlertHandler extends NotificationBroadcasterSupport implements AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>, org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>, DynamicMBean, DirectoryServerMBean
| Constructor and Description |
|---|
JMXAlertHandler()
Creates a new instance of this JMX alert handler.
|
| Modifier and Type | Method and Description |
|---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration) |
void |
finalizeAlertHandler()
Performs any necessary cleanup that may be necessary when this
alert handler is finalized.
|
org.forgerock.opendj.server.config.server.AlertHandlerCfg |
getAlertHandlerConfiguration()
Retrieves the current configuration for this alert handler.
|
Attribute |
getAttribute(String attribute)
Obtain the value of a specific attribute of the Dynamic MBean.
|
AttributeList |
getAttributes(String[] attributes)
Get the values of several attributes of the Dynamic MBean.
|
MBeanInfo |
getMBeanInfo()
Provides the exposed attributes and actions of the Dynamic MBean using an
MBeanInfo object.
|
MBeanNotificationInfo[] |
getNotificationInfo()
Retrieves information about the types of JMX notifications that may be
generated.
|
ObjectName |
getObjectName()
Retrieves the JMX object name for this JMX alert handler.
|
void |
initializeAlertHandler(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration)
Initializes this alert handler based on the information in the
provided configuration entry.
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
Allows an action to be invoked on the Dynamic MBean.
|
boolean |
isConfigurationAcceptable(org.forgerock.opendj.server.config.server.AlertHandlerCfg configuration,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for
this alert handler.
|
boolean |
isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons) |
void |
sendAlertNotification(AlertGenerator generator,
String alertType,
org.forgerock.i18n.LocalizableMessage alertMessage)
Sends an alert notification based on the provided information.
|
void |
setAttribute(Attribute attribute)
Set the value of a specific attribute of the Dynamic MBean.
|
AttributeList |
setAttributes(AttributeList attributes)
Sets the values of several attributes of the Dynamic MBean.
|
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotificationpublic JMXAlertHandler()
initializeAlertHandler method.public void initializeAlertHandler(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration)
throws org.forgerock.opendj.config.server.ConfigException,
InitializationException
AlertHandlerinitializeAlertHandler in interface AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>configuration - The configuration to use to initialize
this alert handler.org.forgerock.opendj.config.server.ConfigException - If the provided entry does not contain
a valid configuration for this alert
handler.InitializationException - If a problem occurs during
initialization that is not
related to the server
configuration.public org.forgerock.opendj.server.config.server.AlertHandlerCfg getAlertHandlerConfiguration()
AlertHandlergetAlertHandlerConfiguration in interface AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>public boolean isConfigurationAcceptable(org.forgerock.opendj.server.config.server.AlertHandlerCfg configuration,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
AlertHandlerisConfigurationAcceptable in interface AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>configuration - The configuration for which to make
tje determination.unacceptableReasons - A list to which human-readable
reasons may be added to explain why
the configuration is not acceptable.true if the provided configuration is
acceptable, or false if it is not.public void finalizeAlertHandler()
AlertHandlerfinalizeAlertHandler in interface AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>public ObjectName getObjectName()
getObjectName in interface DirectoryServerMBeanpublic void sendAlertNotification(AlertGenerator generator, String alertType, org.forgerock.i18n.LocalizableMessage alertMessage)
AlertHandlersendAlertNotification in interface AlertHandler<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>generator - The alert generator that created the alert.alertType - The alert type name for this alert.alertMessage - A message (possibly null) that can
provide more information about this alert.public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcastergetNotificationInfo in class NotificationBroadcasterSupportpublic Attribute getAttribute(String attribute) throws AttributeNotFoundException
getAttribute in interface DynamicMBeanattribute - The name of the attribute to be retrieved.AttributeNotFoundException - If the specified attribute is not
associated with this MBean.public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException
setAttribute in interface DynamicMBeanattribute - The identification of the attribute to be set and the
value it is to be set to.AttributeNotFoundException - If the specified attribute is not
associated with this MBean.InvalidAttributeValueException - If the provided value is not
acceptable for this MBean.public AttributeList getAttributes(String[] attributes)
getAttributes in interface DynamicMBeanattributes - A list of the attributes to be retrieved.public AttributeList setAttributes(AttributeList attributes)
setAttributes in interface DynamicMBeanattributes - A list of attributes: The identification of the
attributes to be set and the values they are to be set
to.public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException
invoke in interface DynamicMBeanactionName - The name of the action to be invoked.params - An array containing the parameters to be set when the
action is invoked.signature - An array containing the signature of the action. The
class objects will be loaded through the same class
loader as the one used for loading the MBean on which
action is invoked.MBeanException - If a problem is encountered while invoking the
method.public MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeanMBeanInfo allowing all attributes and
actions exposed by this Dynamic MBean to be retrieved.public boolean isConfigurationChangeAcceptable(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration,
List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg configuration)
applyConfigurationChange in interface org.forgerock.opendj.config.server.ConfigurationChangeListener<org.forgerock.opendj.server.config.server.JMXAlertHandlerCfg>Copyright © 2010-2020 Wren Security. All Rights Reserved.