The Basic Relation Service Classes

The relation service classes, which were briefly mentioned in the previous section, are the basic classes needed to describe relationships between MBeans. In this section, we will take a closer look at these classes. The material here will serve as a reference for the next section, in which we will see how to write code to use the relation service. Examples will be provided in this section to point out some of the features of the various classes. In this section, we assume that the relation service has been created and has been given the variable name relationService. In the next section, Section 11.3, we will look at more detailed examples.

RoleInfo

The RoleInfo class is used to describe the role that one or more MBeans (of the same Java class) perform. RoleInfo contains the following read-only attributes:

Name

The name of the role. Must be unique for any given RelationType object.

RefMBeanClassName

The Java class name of the MBean(s) that will act in the role described by this RoleInfo object.

Readable

Indicates whether or not information about the role can be accessed.

Writable

Indicates whether or not information about the role can be modified.

MinimumDegree

The lower bound on the multiplicity (size) of the number of MBeans that may perform the role. Must be less than or equal to the maximum degree.

MaximumDegree

The upper bound on the multiplicity (size) of the number of MBeans that may perform the role. Must be greater than or equal ...

Get Java Management Extensions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.