@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayInvoke=true) public final class JMXMBean extends Object implements DynamicMBean, DirectoryServerMBean
Constructor and Description |
---|
JMXMBean(Dn monitorEntryDN)
Creates a new dynamic JMX MBean for use with the Directory Server.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlertGenerator(AlertGenerator generator)
Adds the provided alert generator to the set of alert generators associated with this JMX MBean.
|
void |
addMonitorProvider(MonitorProvider component)
Adds the given monitor provider to the set of components associated with this JMX MBean.
|
List<AlertGenerator> |
getAlertGenerators()
Retrieves the set of alert generators for this JMX MBean.
|
Attribute |
getAttribute(String attributeName)
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.
|
static String |
getJmxName(Dn monitorEntryDN)
Creates a JMX object name string based on a DN.
|
MBeanInfo |
getMBeanInfo()
Provides the exposed attributes and actions of the Dynamic MBean using an MBeanInfo object.
|
ObjectName |
getObjectName()
Retrieves the JMX object name for this JMX MBean.
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
Allows an action to be invoked on the Dynamic MBean.
|
boolean |
removeAlertGenerator(AlertGenerator generator)
Removes the provided alert generator from the set of alert generators associated with this JMX MBean.
|
boolean |
removeMonitorProvider(MonitorProvider component)
Removes the given monitor provider from the set of components associated with this JMX MBean.
|
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.
|
public JMXMBean(Dn monitorEntryDN)
monitorEntryDN
- The DN of the monitoring entry with which this MBean is associated.public static String getJmxName(Dn monitorEntryDN)
monitorEntryDN
- The DN of the monitoring entry with which this ObjectName is associated.public ObjectName getObjectName()
getObjectName
in interface DirectoryServerMBean
public List<AlertGenerator> getAlertGenerators()
public void addAlertGenerator(AlertGenerator generator)
generator
- The alert generator to add to the set of alert generators for this JMX MBean.public boolean removeAlertGenerator(AlertGenerator generator)
generator
- The alert generator to remove from the set of alert generators for this JMX MBean.true
if the alert generator was removed, or false
if it was not associated with this
MBean.public void addMonitorProvider(MonitorProvider component)
component
- The component to add to the set of monitor providers for this JMX MBean.public boolean removeMonitorProvider(MonitorProvider component)
component
- The component to remove from the set of monitor providers for this JMX MBean.true
if the specified component was successfully removed, or false
if not.public Attribute getAttribute(String attributeName) throws AttributeNotFoundException
getAttribute
in interface DynamicMBean
attributeName
- 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 InvalidAttributeValueException
InvalidAttributeValueException
because setting attribute values over JMX is currently not allowed.setAttribute
in interface DynamicMBean
attribute
- The identification of the attribute to be set and the value it is to be set to.InvalidAttributeValueException
- If the provided value is not acceptable for this MBean.public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
attributes
- A list of the attributes to be retrieved.public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
attributes
- 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 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.MBeanException
- If a problem is encountered while invoking the method.public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
MBeanInfo
allowing all attributes and actions exposed by this Dynamic MBean to be
retrieved.Copyright 2010-2022 ForgeRock AS.