Java Reference
In-Depth Information
Role
The Role class represents the roles of a relation; it consists of a role name and a
role value. The role value is a list of MBeans that are acting as a role in a given
relation. The role value must conform to the definition of its corresponding
RoleInfo object. The role name corresponds to the RoleInfo name defined in
the relation type of the Relation instance.
11.2 Using the relation service
t o manage a phone system
We've given you a lot of information to process all at once. A good example will
help you understand all these classes and terms. In this section, you will model a
real-world phone system using MBeans and their relationships. You'll see how
relations are useful to associate MBeans and operate on them as a single unit.
The first thing we need to do is describe the scenario of the example. We will
describe a system modeled with MBeans that presents a problem, and use the
relation service to solve that problem.
11.2.1
Defining the scenario
Consider a system that sends and receives phone and fax messages. It consists of
an application that controls the incoming and outgoing calls and faxes. In this
system, the controller application can work with up to 10 phone cards and 1 fax
card. In addition, the application uses a routing table to control the flow of calls.
The routing table is the means by which the application makes decisions about
whether to put a phone or fax board in the receive or send state. Figure 11.1 illus-
trates this system.
As operators of this system, you want a way to disable a device card and update
the routing table in a single, efficient step. To do this, you will instrument the
application using a JMX environment. To manage the system, you will define the
following three types of MBeans:
A phone card MBean
A fax card MBean
A routing table MBean
Managing phone and fax cards
To control the phone and fax devices, you need to define an MBean for each
card. For phone cards, you will create an MBean represented by the PhoneCard
Search WWH ::




Custom Search