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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access