Package org.opends.server.protocols.jmx
Class JMXMBean
java.lang.Object
org.opends.server.protocols.jmx.JMXMBean
- All Implemented Interfaces:
DynamicMBean,DirectoryServerMBean
This class defines a JMX MBean that can be registered with the Directory Server to provide monitoring and statistical
information, provide read and/or read-write access to the monitoring, and provide notifications and alerts if a
significant event or severe/fatal error occurs.
-
Constructor Summary
ConstructorsConstructorDescriptionJMXMBean(Dn monitorEntryDN, ServerContext serverContext) Creates a new dynamic JMX MBean for use with the Directory Server. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlertGenerator(AlertGenerator generator) Adds the provided alert generator to the set of alert generators associated with this JMX MBean.voidaddMonitorProvider(MonitorProvider component) Adds the given monitor provider to the set of components associated with this JMX MBean.getAttribute(String attributeName) Obtain the value of a specific attribute of the Dynamic MBean.getAttributes(String[] attributes) Get the values of several attributes of the Dynamic MBean.Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.Retrieves the JMX object name for this JMX MBean.Allows an action to be invoked on the Dynamic MBean.voidremoveAlertGenerator(AlertGenerator generator) Removes the provided alert generator from the set of alert generators associated with this JMX MBean.voidremoveMonitorProvider(MonitorProvider component) Removes the given monitor provider from the set of components associated with this JMX MBean.voidsetAttribute(Attribute attribute) Set the value of a specific attribute of the Dynamic MBean.setAttributes(AttributeList attributes) Sets the values of several attributes of the Dynamic MBean.
-
Constructor Details
-
JMXMBean
Creates a new dynamic JMX MBean for use with the Directory Server.- Parameters:
monitorEntryDN- The DN of the monitoring entry with which this MBean is associated.serverContext- The server context- Throws:
MalformedObjectNameException- if we cannot build a valid JMX object name
-
-
Method Details
-
getObjectName
Retrieves the JMX object name for this JMX MBean.- Specified by:
getObjectNamein interfaceDirectoryServerMBean- Returns:
- The JMX object name for this JMX MBean.
-
addAlertGenerator
Adds the provided alert generator to the set of alert generators associated with this JMX MBean.- Parameters:
generator- The alert generator to add to the set of alert generators for this JMX MBean.
-
removeAlertGenerator
Removes the provided alert generator from the set of alert generators associated with this JMX MBean.- Parameters:
generator- The alert generator to remove from the set of alert generators for this JMX MBean.
-
addMonitorProvider
Adds the given monitor provider to the set of components associated with this JMX MBean.- Parameters:
component- The component to add to the set of monitor providers for this JMX MBean.
-
removeMonitorProvider
Removes the given monitor provider from the set of components associated with this JMX MBean.- Parameters:
component- The component to remove from the set of monitor providers for this JMX MBean.
-
getAttribute
Obtain the value of a specific attribute of the Dynamic MBean.- Specified by:
getAttributein interfaceDynamicMBean- Parameters:
attributeName- The name of the attribute to be retrieved.- Returns:
- The requested attribute.
- Throws:
AttributeNotFoundException- If the specified attribute is not associated with this MBean.
-
setAttribute
Set the value of a specific attribute of the Dynamic MBean. In this case, it will always throwInvalidAttributeValueExceptionbecause setting attribute values over JMX is currently not allowed.- Specified by:
setAttributein interfaceDynamicMBean- Parameters:
attribute- The identification of the attribute to be set and the value it is to be set to.- Throws:
InvalidAttributeValueException- If the provided value is not acceptable for this MBean.
-
getAttributes
Get the values of several attributes of the Dynamic MBean.- Specified by:
getAttributesin interfaceDynamicMBean- Parameters:
attributes- A list of the attributes to be retrieved.- Returns:
- The list of attributes retrieved.
-
setAttributes
Sets the values of several attributes of the Dynamic MBean.- Specified by:
setAttributesin interfaceDynamicMBean- Parameters:
attributes- A list of attributes: The identification of the attributes to be set and the values they are to be set to.- Returns:
- The list of attributes that were set with their new values. In this case, the list will always be empty because we do not support setting attribute values over JMX.
-
invoke
Allows an action to be invoked on the Dynamic MBean.- Specified by:
invokein interfaceDynamicMBean- Parameters:
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.- Returns:
- The object returned by the action, which represents the result of invoking the action on the MBean specified.
- Throws:
MBeanException- If a problem is encountered while invoking the method.
-
getMBeanInfo
Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.- Specified by:
getMBeanInfoin interfaceDynamicMBean- Returns:
- An instance of
MBeanInfoallowing all attributes and actions exposed by this Dynamic MBean to be retrieved.
-