Java Reference
In-Depth Information
Figure 4.5
Creating a management
interface by extending an
existing MBean interface
and extending a MBean.
PrinterMBean
, the management interface of the
CopierPrinter
class includes the
attributes and operations from both MBean interfaces.
4.3.6
Extending a non-MBean interface
As we showed in section 4.3.4, the MBean interface can extend another MBean inter-
face. It can also extend a non-MBean interface. Figure 4.6 depicts such a scenario.
When an MBean interface extends another interface that is not an MBean
interface, the resulting exposed attributes and operations are determined by
both interfaces because the MBean interface inherits all the methods of its par-
ent. It does not matter that the
Device
interface does not follow the MBean
interface naming pattern.
Figure 4.6
Creating an MBean interface by
extending a non-MBean interface.
The
CopierPrinter
management
interface will be composed of
methods from both the
Device
and
PrinterMBean
interfaces.