java.lang.Object
javax.management.NotificationBroadcasterSupport
javax.management.relation.RelationService
- All Implemented Interfaces:
EventListener
,MBeanRegistration
,NotificationBroadcaster
,NotificationEmitter
,NotificationListener
,RelationServiceMBean
public class RelationService
extends NotificationBroadcasterSupport
implements RelationServiceMBean, MBeanRegistration, NotificationListener
The Relation Service is in charge of creating and deleting relation types
and relations, of handling the consistency and of providing query
mechanisms.
It implements the NotificationBroadcaster by extending NotificationBroadcasterSupport to send notifications when a relation is removed from it.
It implements the NotificationListener interface to be able to receive notifications concerning unregistration of MBeans referenced in relation roles and of relation MBeans.
It implements the MBeanRegistration interface to be able to retrieve its ObjectName and MBean Server.
- Since:
- 1.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelation
(ObjectName relationObjectName) Adds an MBean created by the user (and registered by him in the MBean Server) as a relation in the Relation Service.void
addRelationType
(RelationType relationTypeObj) Adds given object as a relation type.checkRoleReading
(String roleName, String relationTypeName) Checks if given Role can be read in a relation of the given type.checkRoleWriting
(Role role, String relationTypeName, Boolean initFlag) Checks if given Role can be set in a relation of given type.void
createRelation
(String relationId, String relationTypeName, RoleList roleList) Creates a simple relation (represented by a RelationSupport object) of given relation type, and adds it in the Relation Service.void
createRelationType
(String relationTypeName, RoleInfo[] roleInfoArray) Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service.findAssociatedMBeans
(ObjectName mbeanName, String relationTypeName, String roleName) Retrieves the MBeans associated to given one in a relation.