|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.opends.server.extensions.JMXAlertHandler
public class JMXAlertHandler
This class provides an implementation of a Directory Server alert handler that will send alerts using JMX notifications.
Constructor Summary | |
---|---|
JMXAlertHandler()
Creates a new instance of this JMX alert handler. |
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(JMXAlertHandlerCfg configuration)
Applies the configuration changes to this change listener. |
void |
finalizeAlertHandler()
Performs any necessary cleanup that may be necessary when this alert handler is finalized. |
AlertHandlerCfg |
getAlertHandlerConfiguration()
Retrieves the current configuration for this alert handler. |
javax.management.Attribute |
getAttribute(java.lang.String attribute)
Obtain the value of a specific attribute of the Dynamic MBean. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
Get the values of several attributes of the Dynamic MBean. |
javax.management.MBeanInfo |
getMBeanInfo()
Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object. |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
Retrieves information about the types of JMX notifications that may be generated. |
javax.management.ObjectName |
getObjectName()
Retrieves the JMX object name for this JMX alert handler. |
void |
initializeAlertHandler(JMXAlertHandlerCfg configuration)
Initializes this alert handler based on the information in the provided configuration entry. |
java.lang.Object |
invoke(java.lang.String actionName,
java.lang.Object[] params,
java.lang.String[] signature)
Allows an action to be invoked on the Dynamic MBean. |
boolean |
isConfigurationAcceptable(AlertHandlerCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the provided configuration is acceptable for this alert handler. |
boolean |
isConfigurationChangeAcceptable(JMXAlertHandlerCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
void |
sendAlertNotification(AlertGenerator generator,
java.lang.String alertType,
Message alertMessage)
Sends an alert notification based on the provided information. |
void |
setAttribute(javax.management.Attribute attribute)
Set the value of a specific attribute of the Dynamic MBean. |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Sets the values of several attributes of the Dynamic MBean. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JMXAlertHandler()
initializeAlertHandler
method.
Method Detail |
---|
public void initializeAlertHandler(JMXAlertHandlerCfg configuration) throws ConfigException, InitializationException
initializeAlertHandler
in interface AlertHandler<JMXAlertHandlerCfg>
configuration
- The configuration to use to initialize
this alert handler.
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 AlertHandlerCfg getAlertHandlerConfiguration()
getAlertHandlerConfiguration
in interface AlertHandler<JMXAlertHandlerCfg>
public boolean isConfigurationAcceptable(AlertHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
isConfigurationAcceptable
in interface AlertHandler<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()
finalizeAlertHandler
in interface AlertHandler<JMXAlertHandlerCfg>
public javax.management.ObjectName getObjectName()
getObjectName
in interface DirectoryServerMBean
public void sendAlertNotification(AlertGenerator generator, java.lang.String alertType, Message alertMessage)
sendAlertNotification
in interface AlertHandler<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 javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
getNotificationInfo
in class javax.management.NotificationBroadcasterSupport
public javax.management.Attribute getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException
getAttribute
in interface javax.management.DynamicMBean
attribute
- The name of the attribute to be retrieved.
javax.management.AttributeNotFoundException
- If the specified attribute is not
associated with this MBean.public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException
setAttribute
in interface javax.management.DynamicMBean
attribute
- The identification of the attribute to be set and the
value it is to be set to.
javax.management.AttributeNotFoundException
- If the specified attribute is not
associated with this MBean.
javax.management.InvalidAttributeValueException
- If the provided value is not
acceptable for this MBean.public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
getAttributes
in interface javax.management.DynamicMBean
attributes
- A list of the attributes to be retrieved.
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes
in interface javax.management.DynamicMBean
attributes
- A list of attributes: The identification of the
attributes to be set and the values they are to be set
to.
public java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException
invoke
in interface javax.management.DynamicMBean
actionName
- 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.
javax.management.MBeanException
- If a problem is encountered while invoking the
method.public javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo
in interface javax.management.DynamicMBean
MBeanInfo
allowing all attributes and
actions exposed by this Dynamic MBean to be retrieved.public boolean isConfigurationChangeAcceptable(JMXAlertHandlerCfg configuration, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<JMXAlertHandlerCfg>
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationChange(JMXAlertHandlerCfg configuration)
applyConfigurationChange
in interface ConfigurationChangeListener<JMXAlertHandlerCfg>
configuration
- The new configuration containing the changes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |