Java Reference
In-Depth Information
The first half of the screen, shown in figure 11.6, lists the attributes of the MBean.
Notice the section labeled ReferencedMBeans. There is a
RoutingTable
MBean
with the role name
CallRouter
, a
FaxCard
MBean with the role
FaxProcessor
, and
two
PhoneCard
MBeans with the role
VoiceProcessor
.
These values match those you defined in your code. Now let's look at opera-
tions that are exposed for the MBean. Scrolling down the screen, you'll expose
the list of operations for the MBean as shown in figure 11.7.
You can see your two methods exposed for disabling card devices: the
dis-
ableFaxCard()
method and the
disablePhoneCard()
method.
For a test, let's disable the phone card in slot 2.
11.4.3
Disabling a phone card
To disable the phone card in slot 2, you invoke the
disablePhoneCard()
method
and pass in the number
2
. Your relation MBean will disable the phone card and
Figure 11.7
The bottom
half of the
MBean View
from the
CtlRelation
MBean