java.lang.Object
org.glassfish.gmbal.AMXClient
- All Implemented Interfaces:
AMXMBeanInterface
This class implements a generic AMXMBeanInterface MBean which is connected to a possibly
remote MBeanServerConnection (note that MBeanServer isA MBeanServerConnection,
so we can actually create an AMXClientImpl simply by using the MBeanServer
from the mom: this is useful for testing).
Note that this version of the AMXMBeanInterface API provides a generic get/set API that is identical to DynamicMBean, except that it only throws unchecked exceptions. This is far more convenient in practice than the JMX-standard checked exceptions.
- Author:
- ken
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ObjectNameSpecial object name used to represent a NULL objectName result. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttribute(String attribute) getAttributes(String[] attributes) Containment hierarchy: Get all AMXMBeanInterface contained by this one, in no particular order.getMeta()Get all metadata about this MBean.getName()Usually the same as the ObjectName 'name' property, but can differ if the actual name contains characters that must be escaped for an ObjectName and/or if the MBean has a mutable name attribute."go up one level": the MBean containing this one, can be null for rootinthashCode()voidsetAttribute(String name, Object value) voidsetAttribute(Attribute attribute) setAttributes(AttributeList attributes) toString()
-
Field Details
-
NULL_OBJECTNAME
Special object name used to represent a NULL objectName result.
-
-
Constructor Details
-
AMXClient
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
getName
Description copied from interface:AMXMBeanInterfaceUsually the same as the ObjectName 'name' property, but can differ if the actual name contains characters that must be escaped for an ObjectName and/or if the MBean has a mutable name attribute. The type property can be obtained from the ObjectName- Specified by:
getNamein interfaceAMXMBeanInterface
-
getMeta
Description copied from interface:AMXMBeanInterfaceGet all metadata about this MBean.- Specified by:
getMetain interfaceAMXMBeanInterface- Returns:
- The descriptor, which will be a ModelMBeanInfoSupport instance.
-
getParent
Description copied from interface:AMXMBeanInterface"go up one level": the MBean containing this one, can be null for root- Specified by:
getParentin interfaceAMXMBeanInterface- Returns:
- The container of this MBean (null if already at root).
-
getChildren
Description copied from interface:AMXMBeanInterfaceContainment hierarchy: Get all AMXMBeanInterface contained by this one, in no particular order. Valid only if isContainer(). Note that using an array sidesteps Map/Set/OpenType issues- Specified by:
getChildrenin interfaceAMXMBeanInterface- Returns:
- All children of this AMXMBeanInterface MBean.
-
getAttribute
-
setAttribute
-
setAttribute
-
getAttributes
-
setAttributes
-
invoke
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException - Throws:
MBeanExceptionReflectionException
-
getMBeanInfo
-
objectName
-