Java Reference
In-Depth Information
INFO —The operation returns information, similar to a getter method.
ACTION —The operation causes a change or action on the MBean.
ACTION_INFO —The operation results in a combination of the INFO and
ACTION impact.
UNKNOWN —The impact of the operation is unknown.
The MBeanOperationInfo class provides a set of methods to access information
about the operation it describes. The getReturnType() method returns the class
type of the operation's return value, returning void if the operation does not
have a return value. The getImpact() method returns an int value equal to one
of INFO , ACTION , ACTION_INFO , or UNKNOWN . Finally, the getSignature() method
returns an array of MBeanParameterInfo objects that describe the signature of the
exposed operation.
5.3.6
The MBeanNotificationInfo class
The final metadata class is MBeanNotificationInfo . This class describes the noti-
fications that a particular MBean can emit. We will avoid this class for now,
because it is covered in chapter 6. However, rest assured, it is much the same as
the previously described metadata classes.
5.4 I nheritance patterns
Unlike Standard MBeans, Dynamic MBeans cannot compose a management
interface by adding additional methods through different inheritance patterns.
This is true because the entire management interface of a Dynamic MBean is
exposed by the single method: getMBeanInfo() from the DynamicMBean interface.
An MBean is identified as being Dynamic if the DynamicMBean interface is
found anywhere up its inheritance hierarchy. Remember that MBeans cannot
implement both the DynamicMBean interface and their own MBean interface;
doing so will result in an exception when you attempt to register such an MBean.
Classes that extend a Dynamic MBean class have a special responsibility. As a
subclass to a DynamicMBean interface implementation, a class can pick and choose
which DynamicMBean methods to override. If a subclass changes the exposed man-
agement interface, it must also provide a new getMBeanInfo() implementation. It
is assumed that a Dynamic MBean's getMBeanInfo() return value is an accurate
depiction of an MBean's management interface.
Search WWH ::




Custom Search