Open MBean Metadata Classes
Now that we’ve
seen
how open MBean types work and how they
are defined, let’s take a look at creating the
metadata classes that describe resources that are instrumented as
open MBeans. We will start by seeing how to describe parameters,
attributes, constructors, operations, notifications, and finally
OpenMBeanInfo
. Each of these is described by an
interface and implemented by a support class. This is similar to
model MBeans—the focus of the previous chapter—and the
open MBean types we looked at earlier in this chapter.
As with the open MBean type classes, when we talk about an object
that implements the interface (e.g., an
OpenMBeanParameterInfo
object) we have presupposed
the creation of the object using a support class. This is because we
generally work with a particular open MBean metadata type through its
interface and use the corresponding support class only to create
instances of those objects.
A common theme for all of the OpenMBean*Info
objects (where *
is Parameter
,
Attribute
, etc.) is that the support classes
provided extend their javax.management.MBean*Info
counterparts—for example,
OpenMBeanParameterInfoSupport
extends
MBeanParameterInfo
. The relationships between the
open MBean classes are shown in Figure 5-1.
Figure 5-1. Relationships between the open MBean metadata classes
As we saw with dynamic MBeans in Figure 3-1, a single instance of ...
Get Java Management Extensions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.