Java Reference
In-Depth Information
4.2 Composing the standard management interface
All information about an MBean must be gathered from its management inter-
face. In the previous section, you read that an MBean must implement an
MBean interface or the javax.management.DynamicMBean interface. Standard
MBeans are MBeans that implement a user-developed MBean interface.
An MBean interface is any interface that follows the naming convention
XMBean , where X is some implementing class name (for example, PrinterMBean ).
An MBean interface declares methods that expose the attributes and operations
of a manageable resource.
NOTE
One item of importance is that your MBean interfaces must be in the same
package as your implementation class. For example, if the PrinterMBean
interface was in the package jmxbook.ch6 and the Printer class was in
jmxbook.ch4 , then you would not have a valid MBean.
Remember that a management interface includes the set of attributes and opera-
tions exposed by an MBean, allowing management applications to use the
MBean. In addition, a management interface includes an MBean's constructors
and notifications. The following section covers the composition of an MBean's
management interface.
4.2.1
Components of the management interface
The management interface of an MBean is composed of the four following items:
Its public constructors
Its attributes
Its operations
Its notifications
The next few sections cover the details of each of the four components of the
management interface of an MBean. The description of the management inter-
face pertains to all types of MBeans. MBeans differ in the way the management
interface is exposed, but all management interfaces are composed of the same
four parts.
Public constructors
As you witnessed in chapter 2 when using the HTML adapter via a web browser,
MBeans can be dynamically loaded into JMX agents. Agents do this using any of
Search WWH ::




Custom Search