Package fish.payara.monitoring.rest.app
Class MBeanServerDelegate
- java.lang.Object
-
- fish.payara.monitoring.rest.app.MBeanServerDelegate
-
@Singleton public class MBeanServerDelegate extends Object
- Author:
- Fraser Savage
-
-
Constructor Summary
Constructors Constructor Description MBeanServerDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MBeanInfogetMBean(String mbeanname)Returns anMBeanInfoobject.ObjectgetMBeanAttribute(String mbeanname, String attributename)Returns an MBean attribute in the form of anObject.AttributeListgetMBeanAttributes(String mbeanname, String[] attributenames)Retrieves the values of several attributes of a named MBean.
-
-
-
Method Detail
-
getMBean
public MBeanInfo getMBean(String mbeanname) throws InstanceNotFoundException, IntrospectionException, ReflectionException, MalformedObjectNameException
Returns anMBeanInfoobject. The mbeanname argument must be a validObjectName.- Parameters:
mbeanname- The value of the MBeanObjectName.- Returns:
- The instance of
MBeanInforeturned for the mbeanname provided. - Throws:
InstanceNotFoundExceptionIntrospectionExceptionReflectionExceptionMalformedObjectNameException
-
getMBeanAttribute
public Object getMBeanAttribute(String mbeanname, String attributename) throws MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException, MalformedObjectNameException
Returns an MBean attribute in the form of anObject. The mbeanname argument must be a validObjectName. The attributename argument is a specifier relative to the mbeanname argument.- Parameters:
mbeanname- The value of the MBeanObjectNameattributename- The name of the attribute to get from the mbeanname on theMBeanServer.- Returns:
- The
Objectrepresenting the MBean attribute requested. - Throws:
MBeanExceptionAttributeNotFoundExceptionInstanceNotFoundExceptionReflectionExceptionMalformedObjectNameException
-
getMBeanAttributes
public AttributeList getMBeanAttributes(String mbeanname, String[] attributenames) throws InstanceNotFoundException, MalformedObjectNameException, ReflectionException
Retrieves the values of several attributes of a named MBean. The MBean is identified by its object name. If one or more attributes cannot be retrieved for some reason, they will be omitted from the returnedAttributeList.- Parameters:
mbeanname- The object name of the MBean from which the attributes are retrieved.attributenames- A list of the attributes to be retrieved.- Returns:
- The list of the retrieved attributes.
- Throws:
InstanceNotFoundExceptionMalformedObjectNameExceptionReflectionException
-
-