javax.management.relation
Class RelationService

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport 
      extended by javax.management.relation.RelationService
All Implemented Interfaces:
EventListener sample code for java.util.EventListener definition code for java.util.EventListener , MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration , NotificationBroadcaster sample code for javax.management.NotificationBroadcaster definition code for javax.management.NotificationBroadcaster , NotificationEmitter sample code for javax.management.NotificationEmitter definition code for javax.management.NotificationEmitter , NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener , RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean

public class RelationService
extends NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
implements RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean , MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration , NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.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
RelationService sample code for javax.management.relation.RelationService.RelationService(boolean) definition code for javax.management.relation.RelationService.RelationService(boolean) (boolean theImmediatePurgeFlg)
          Constructor.
 
Method Summary
 void addRelation sample code for javax.management.relation.RelationService.addRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationService.addRelation(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theRelObjectName)
          Adds an MBean created by the user (and registered by him in the MBean Server) as a relation in the Relation Service.
 void addRelationType sample code for javax.management.relation.RelationService.addRelationType(javax.management.relation.RelationType) definition code for javax.management.relation.RelationService.addRelationType(javax.management.relation.RelationType) (RelationType sample code for javax.management.relation.RelationType definition code for javax.management.relation.RelationType  theRelTypeObj)
          Adds given object as a relation type.
 Integer sample code for java.lang.Integer definition code for java.lang.Integer checkRoleReading sample code for javax.management.relation.RelationService.checkRoleReading(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.checkRoleReading(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRoleName, String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
          Checks if given Role can be read in a relation of the given type.
 Integer sample code for java.lang.Integer definition code for java.lang.Integer checkRoleWriting sample code for javax.management.relation.RelationService.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) definition code for javax.management.relation.RelationService.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) (Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole, String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  theInitFlg)
          Checks if given Role can be set in a relation of given type.
 void createRelation sample code for javax.management.relation.RelationService.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationService.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) (String sample code for java.lang.String definition code for java.lang.String  theRelId, String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
          Creates a simple relation (represented by a RelationSupport object) of given relation type, and adds it in the Relation Service.
 void createRelationType sample code for javax.management.relation.RelationService.createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) definition code for javax.management.relation.RelationService.createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) (String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo [] theRoleInfoArray)
          Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service.
 Map sample code for java.util.Map definition code for java.util.Map findAssociatedMBeans sample code for javax.management.relation.RelationService.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theMBeanName, String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, String sample code for java.lang.String definition code for java.lang.String  theRoleName)
          Retrieves the MBeans associated to given one in a relation.
 Map sample code for java.util.Map definition code for java.util.Map findReferencingRelations sample code for javax.management.relation.RelationService.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theMBeanName, String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, String sample code for java.lang.String definition code for java.lang.String  theRoleName)
          Retrieves the relations where a given MBean is referenced.
 List sample code for java.util.List definition code for java.util.List findRelationsOfType sample code for javax.management.relation.RelationService.findRelationsOfType(java.lang.String) definition code for javax.management.relation.RelationService.findRelationsOfType(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
          Returns the relation ids for relations of the given type.
 List sample code for java.util.List definition code for java.util.List getAllRelationIds sample code for javax.management.relation.RelationService.getAllRelationIds() definition code for javax.management.relation.RelationService.getAllRelationIds() ()
          Returns all the relation ids for all the relations handled by the Relation Service.
 List sample code for java.util.List definition code for java.util.List getAllRelationTypeNames sample code for javax.management.relation.RelationService.getAllRelationTypeNames() definition code for javax.management.relation.RelationService.getAllRelationTypeNames() ()
          Retrieves names of all known relation types.
 RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult getAllRoles sample code for javax.management.relation.RelationService.getAllRoles(java.lang.String) definition code for javax.management.relation.RelationService.getAllRoles(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Returns all roles present in the relation.
 MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo sample code for javax.management.relation.RelationService.getNotificationInfo() definition code for javax.management.relation.RelationService.getNotificationInfo() ()
          Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent.
 boolean getPurgeFlag sample code for javax.management.relation.RelationService.getPurgeFlag() definition code for javax.management.relation.RelationService.getPurgeFlag() ()
          Returns the flag to indicate if when a notification is received for the unregistration of an MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.
 Map sample code for java.util.Map definition code for java.util.Map getReferencedMBeans sample code for javax.management.relation.RelationService.getReferencedMBeans(java.lang.String) definition code for javax.management.relation.RelationService.getReferencedMBeans(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Retrieves MBeans referenced in the various roles of the relation.
 String sample code for java.lang.String definition code for java.lang.String getRelationTypeName sample code for javax.management.relation.RelationService.getRelationTypeName(java.lang.String) definition code for javax.management.relation.RelationService.getRelationTypeName(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Returns name of associated relation type for given relation.
 List sample code for java.util.List definition code for java.util.List getRole sample code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId, String sample code for java.lang.String definition code for java.lang.String  theRoleName)
          Retrieves role value for given role name in given relation.
 Integer sample code for java.lang.Integer definition code for java.lang.Integer getRoleCardinality sample code for javax.management.relation.RelationService.getRoleCardinality(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRoleCardinality(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId, String sample code for java.lang.String definition code for java.lang.String  theRoleName)
          Retrieves the number of MBeans currently referenced in the given role.
 RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo getRoleInfo sample code for javax.management.relation.RelationService.getRoleInfo(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRoleInfo(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelTypeName, String sample code for java.lang.String definition code for java.lang.String  theRoleInfoName)
          Retrieves role info for given role name of a given relation type.
 List sample code for java.util.List definition code for java.util.List getRoleInfos sample code for javax.management.relation.RelationService.getRoleInfos(java.lang.String) definition code for javax.management.relation.RelationService.getRoleInfos(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
          Retrieves list of role infos (RoleInfo objects) of a given relation type.
 RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult getRoles sample code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[]) definition code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[]) (String sample code for java.lang.String definition code for java.lang.String  theRelId, String sample code for java.lang.String definition code for java.lang.String [] theRoleNameArray)
          Retrieves values of roles with given names in given relation.
 void handleNotification sample code for javax.management.relation.RelationService.handleNotification(javax.management.Notification, java.lang.Object) definition code for javax.management.relation.RelationService.handleNotification(javax.management.Notification, java.lang.Object) (Notification sample code for javax.management.Notification definition code for javax.management.Notification  theNtf, Object sample code for java.lang.Object definition code for java.lang.Object  theHandback)
          Invoked when a JMX notification occurs.
 Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean hasRelation sample code for javax.management.relation.RelationService.hasRelation(java.lang.String) definition code for javax.management.relation.RelationService.hasRelation(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Checks if there is a relation identified in Relation Service with given relation id.
 void isActive sample code for javax.management.relation.RelationService.isActive() definition code for javax.management.relation.RelationService.isActive() ()
          Checks if the Relation Service is active.
 String sample code for java.lang.String definition code for java.lang.String isRelation sample code for javax.management.relation.RelationService.isRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationService.isRelation(javax.management.ObjectName) (ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
          Returns the relation id associated to the given ObjectName if the MBean has been added as a relation in the Relation Service.
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName isRelationMBean sample code for javax.management.relation.RelationService.isRelationMBean(java.lang.String) definition code for javax.management.relation.RelationService.isRelationMBean(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          If the relation is represented by an MBean (created by the user and added as a relation in the Relation Service), returns the ObjectName of the MBean.
 void postDeregister sample code for javax.management.relation.RelationService.postDeregister() definition code for javax.management.relation.RelationService.postDeregister() ()
          Allows the MBean to perform any operations needed after having been unregistered in the MBean server.
 void postRegister sample code for javax.management.relation.RelationService.postRegister(java.lang.Boolean) definition code for javax.management.relation.RelationService.postRegister(java.lang.Boolean) (Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
          Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.
 void preDeregister sample code for javax.management.relation.RelationService.preDeregister() definition code for javax.management.relation.RelationService.preDeregister() ()
          Allows the MBean to perform any operations it needs before being unregistered by the MBean server.
 ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName preRegister sample code for javax.management.relation.RelationService.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.relation.RelationService.preRegister(javax.management.MBeanServer, javax.management.ObjectName) (MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  server, ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
          Allows the MBean to perform any operations it needs before being registered in the MBean server.
 void purgeRelations sample code for javax.management.relation.RelationService.purgeRelations() definition code for javax.management.relation.RelationService.purgeRelations() ()
          Purges the relations.
 void removeRelation sample code for javax.management.relation.RelationService.removeRelation(java.lang.String) definition code for javax.management.relation.RelationService.removeRelation(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Removes given relation from the Relation Service.
 void removeRelationType sample code for javax.management.relation.RelationService.removeRelationType(java.lang.String) definition code for javax.management.relation.RelationService.removeRelationType(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
          Removes given relation type from Relation Service.
 void sendRelationCreationNotification sample code for javax.management.relation.RelationService.sendRelationCreationNotification(java.lang.String) definition code for javax.management.relation.RelationService.sendRelationCreationNotification(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  theRelId)
          Sends a notification (RelationNotification) for a relation creation.
 void sendRelationRemovalNotification sample code for javax.management.relation.RelationService.sendRelationRemovalNotification(java.lang.String, java.util.List) definition code for javax.management.relation.RelationService.sendRelationRemovalNotification(java.lang.String, java.util.List) (String sample code for java.lang.String definition code for java.lang.String  theRelId, List sample code for java.util.List definition code for java.util.List  theUnregMBeanList)
          Sends a notification (RelationNotification) for a relation removal.
 void sendRoleUpdateNotification sample code for javax.management.relation.RelationService.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationService.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) (String sample code for java.lang.String definition code for java.lang.String  theRelId, Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theNewRole, List sample code for java.util.List definition code for java.util.List  theOldRoleValue)
          Sends a notification (RelationNotification) for a role update in the given relation.
 void setPurgeFlag sample code for javax.management.relation.RelationService.setPurgeFlag(boolean) definition code for javax.management.relation.RelationService.setPurgeFlag(boolean) (boolean thePurgeFlg)
          Sets the flag to indicate if when a notification is received for the unregistration of an MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.
 void setRole sample code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role) definition code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role) (String sample code for java.lang.String definition code for java.lang.String  theRelId, Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
          Sets the given role in given relation.
 RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult setRoles sample code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList) (String sample code for java.lang.String definition code for java.lang.String  theRelId, RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
          Sets the given roles in given relation.
 void updateRoleMap sample code for javax.management.relation.RelationService.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationService.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) (String sample code for java.lang.String definition code for java.lang.String  theRelId, Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theNewRole, List sample code for java.util.List definition code for java.util.List  theOldRoleValue)
          Handles update of the Relation Service role map for the update of given role in given relation.
 
Methods inherited from class javax.management.NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
addNotificationListener sample code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , handleNotification sample code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.handleNotification(javax.management.NotificationListener, javax.management.Notification, java.lang.Object) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener) , removeNotificationListener sample code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) definition code for javax.management.NotificationBroadcasterSupport.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , sendNotification sample code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification) definition code for javax.management.NotificationBroadcasterSupport.sendNotification(javax.management.Notification)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

RelationService sample code for javax.management.relation.RelationService(boolean) definition code for javax.management.relation.RelationService(boolean)

public RelationService(boolean theImmediatePurgeFlg)
Constructor.

Parameters:
theImmediatePurgeFlg - flag to indicate when a notification is received for the unregistration of an MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.

true is immediate purge.

Method Detail

isActive sample code for javax.management.relation.RelationService.isActive() definition code for javax.management.relation.RelationService.isActive()

public void isActive()
              throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException 
Checks if the Relation Service is active. Current condition is that the Relation Service must be registered in the MBean Server

Specified by:
isActive sample code for javax.management.relation.RelationServiceMBean.isActive() definition code for javax.management.relation.RelationServiceMBean.isActive() in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if it is not registered

preRegister sample code for javax.management.relation.RelationService.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.relation.RelationService.preRegister(javax.management.MBeanServer, javax.management.ObjectName)

public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  preRegister(MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer  server,
                              ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  name)
                       throws Exception sample code for java.lang.Exception definition code for java.lang.Exception 
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
Allows the MBean to perform any operations it needs before being registered in the MBean server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean server.

Specified by:
preRegister sample code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) definition code for javax.management.MBeanRegistration.preRegister(javax.management.MBeanServer, javax.management.ObjectName) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
server - The MBean server in which the MBean will be registered.
name - The object name of the MBean. This name is null if the name parameter to one of the createMBean or registerMBean methods in the MBeanServer sample code for javax.management.MBeanServer definition code for javax.management.MBeanServer interface is null. In that case, this method must return a non-null ObjectName for the new MBean.
Returns:
The name under which the MBean is to be registered. This value must not be null. If the name parameter is not null, it will usually but not necessarily be the returned value.
Throws:
Exception sample code for java.lang.Exception definition code for java.lang.Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException .

postRegister sample code for javax.management.relation.RelationService.postRegister(java.lang.Boolean) definition code for javax.management.relation.RelationService.postRegister(java.lang.Boolean)

public void postRegister(Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  registrationDone)
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) definition code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean)
Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed.

Specified by:
postRegister sample code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) definition code for javax.management.MBeanRegistration.postRegister(java.lang.Boolean) in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Parameters:
registrationDone - Indicates whether or not the MBean has been successfully registered in the MBean server. The value false means that the registration phase has failed.

preDeregister sample code for javax.management.relation.RelationService.preDeregister() definition code for javax.management.relation.RelationService.preDeregister()

public void preDeregister()
                   throws Exception sample code for java.lang.Exception definition code for java.lang.Exception 
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.preDeregister() definition code for javax.management.MBeanRegistration.preDeregister()
Allows the MBean to perform any operations it needs before being unregistered by the MBean server.

Specified by:
preDeregister sample code for javax.management.MBeanRegistration.preDeregister() definition code for javax.management.MBeanRegistration.preDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration
Throws:
Exception sample code for java.lang.Exception definition code for java.lang.Exception - This exception will be caught by the MBean server and re-thrown as an MBeanRegistrationException sample code for javax.management.MBeanRegistrationException definition code for javax.management.MBeanRegistrationException .

postDeregister sample code for javax.management.relation.RelationService.postDeregister() definition code for javax.management.relation.RelationService.postDeregister()

public void postDeregister()
Description copied from interface: MBeanRegistration sample code for javax.management.MBeanRegistration.postDeregister() definition code for javax.management.MBeanRegistration.postDeregister()
Allows the MBean to perform any operations needed after having been unregistered in the MBean server.

Specified by:
postDeregister sample code for javax.management.MBeanRegistration.postDeregister() definition code for javax.management.MBeanRegistration.postDeregister() in interface MBeanRegistration sample code for javax.management.MBeanRegistration definition code for javax.management.MBeanRegistration

getPurgeFlag sample code for javax.management.relation.RelationService.getPurgeFlag() definition code for javax.management.relation.RelationService.getPurgeFlag()

public boolean getPurgeFlag()
Returns the flag to indicate if when a notification is received for the unregistration of an MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.

true is immediate purge.

Specified by:
getPurgeFlag sample code for javax.management.relation.RelationServiceMBean.getPurgeFlag() definition code for javax.management.relation.RelationServiceMBean.getPurgeFlag() in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Returns:
true if purges are automatic.
See Also:
setPurgeFlag(boolean) sample code for javax.management.relation.RelationService.setPurgeFlag(boolean) definition code for javax.management.relation.RelationService.setPurgeFlag(boolean)

setPurgeFlag sample code for javax.management.relation.RelationService.setPurgeFlag(boolean) definition code for javax.management.relation.RelationService.setPurgeFlag(boolean)

public void setPurgeFlag(boolean thePurgeFlg)
Sets the flag to indicate if when a notification is received for the unregistration of an MBean referenced in a relation, if an immediate "purge" of the relations (look for the relations no longer valid) has to be performed , or if that will be performed only when the purgeRelations method will be explicitly called.

true is immediate purge.

Specified by:
setPurgeFlag sample code for javax.management.relation.RelationServiceMBean.setPurgeFlag(boolean) definition code for javax.management.relation.RelationServiceMBean.setPurgeFlag(boolean) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
thePurgeFlg - flag
See Also:
getPurgeFlag() sample code for javax.management.relation.RelationService.getPurgeFlag() definition code for javax.management.relation.RelationService.getPurgeFlag()

createRelationType sample code for javax.management.relation.RelationService.createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) definition code for javax.management.relation.RelationService.createRelationType(java.lang.String, javax.management.relation.RoleInfo[])

public void createRelationType(String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                               RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo [] theRoleInfoArray)
                        throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                               InvalidRelationTypeException sample code for javax.management.relation.InvalidRelationTypeException definition code for javax.management.relation.InvalidRelationTypeException 
Creates a relation type (a RelationTypeSupport object) with given role infos (provided by the RoleInfo objects), and adds it in the Relation Service.

Specified by:
createRelationType sample code for javax.management.relation.RelationServiceMBean.createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) definition code for javax.management.relation.RelationServiceMBean.createRelationType(java.lang.String, javax.management.relation.RoleInfo[]) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeName - name of the relation type
theRoleInfoArray - array of role infos
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
InvalidRelationTypeException sample code for javax.management.relation.InvalidRelationTypeException definition code for javax.management.relation.InvalidRelationTypeException - If:

- there is already a relation type with that name

- the same name has been used for two different role infos

- no role info provided

- one null role info provided


addRelationType sample code for javax.management.relation.RelationService.addRelationType(javax.management.relation.RelationType) definition code for javax.management.relation.RelationService.addRelationType(javax.management.relation.RelationType)

public void addRelationType(RelationType sample code for javax.management.relation.RelationType definition code for javax.management.relation.RelationType  theRelTypeObj)
                     throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                            InvalidRelationTypeException sample code for javax.management.relation.InvalidRelationTypeException definition code for javax.management.relation.InvalidRelationTypeException 
Adds given object as a relation type. The object is expected to implement the RelationType interface.

Specified by:
addRelationType sample code for javax.management.relation.RelationServiceMBean.addRelationType(javax.management.relation.RelationType) definition code for javax.management.relation.RelationServiceMBean.addRelationType(javax.management.relation.RelationType) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeObj - relation type object (implementing the RelationType interface)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
InvalidRelationTypeException sample code for javax.management.relation.InvalidRelationTypeException definition code for javax.management.relation.InvalidRelationTypeException - if:

- the same name has been used for two different roles

- no role info provided

- one null role info provided

- there is already a relation type with that name


getAllRelationTypeNames sample code for javax.management.relation.RelationService.getAllRelationTypeNames() definition code for javax.management.relation.RelationService.getAllRelationTypeNames()

public List sample code for java.util.List definition code for java.util.List  getAllRelationTypeNames()
Retrieves names of all known relation types.

Specified by:
getAllRelationTypeNames sample code for javax.management.relation.RelationServiceMBean.getAllRelationTypeNames() definition code for javax.management.relation.RelationServiceMBean.getAllRelationTypeNames() in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Returns:
ArrayList of relation type names (Strings)

getRoleInfos sample code for javax.management.relation.RelationService.getRoleInfos(java.lang.String) definition code for javax.management.relation.RelationService.getRoleInfos(java.lang.String)

public List sample code for java.util.List definition code for java.util.List  getRoleInfos(String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
                  throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                         RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException 
Retrieves list of role infos (RoleInfo objects) of a given relation type.

Specified by:
getRoleInfos sample code for javax.management.relation.RelationServiceMBean.getRoleInfos(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getRoleInfos(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeName - name of relation type
Returns:
ArrayList of RoleInfo.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if there is no relation type with that name.

getRoleInfo sample code for javax.management.relation.RelationService.getRoleInfo(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRoleInfo(java.lang.String, java.lang.String)

public RoleInfo sample code for javax.management.relation.RoleInfo definition code for javax.management.relation.RoleInfo  getRoleInfo(String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                            String sample code for java.lang.String definition code for java.lang.String  theRoleInfoName)
                     throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                            RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException ,
                            RoleInfoNotFoundException sample code for javax.management.relation.RoleInfoNotFoundException definition code for javax.management.relation.RoleInfoNotFoundException 
Retrieves role info for given role name of a given relation type.

Specified by:
getRoleInfo sample code for javax.management.relation.RelationServiceMBean.getRoleInfo(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getRoleInfo(java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeName - name of relation type
theRoleInfoName - name of role
Returns:
RoleInfo object.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if the relation type is not known in the Relation Service
RoleInfoNotFoundException sample code for javax.management.relation.RoleInfoNotFoundException definition code for javax.management.relation.RoleInfoNotFoundException - if the role is not part of the relation type.

removeRelationType sample code for javax.management.relation.RelationService.removeRelationType(java.lang.String) definition code for javax.management.relation.RelationService.removeRelationType(java.lang.String)

public void removeRelationType(String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
                        throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                               IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                               RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException 
Removes given relation type from Relation Service.

The relation objects of that type will be removed from the Relation Service.

Specified by:
removeRelationType sample code for javax.management.relation.RelationServiceMBean.removeRelationType(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.removeRelationType(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeName - name of the relation type to be removed
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - If there is no relation type with that name

createRelation sample code for javax.management.relation.RelationService.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationService.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList)

public void createRelation(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                           String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                           RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
                    throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                           IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                           RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException ,
                           InvalidRelationIdException sample code for javax.management.relation.InvalidRelationIdException definition code for javax.management.relation.InvalidRelationIdException ,
                           RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException ,
                           InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException 
Creates a simple relation (represented by a RelationSupport object) of given relation type, and adds it in the Relation Service.

Roles are initialized according to the role list provided in parameter. The ones not initialized in this way are set to an empty ArrayList of ObjectNames.

A RelationNotification, with type RELATION_BASIC_CREATION, is sent.

Specified by:
createRelation sample code for javax.management.relation.RelationServiceMBean.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationServiceMBean.createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation identifier, to identify uniquely the relation inside the Relation Service
theRelTypeName - name of the relation type (has to be created in the Relation Service)
theRoleList - role list to initialize roles of the relation (can be null).
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter, except the role list which can be null if no role initialization
RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException - if a value is provided for a role that does not exist in the relation type
InvalidRelationIdException sample code for javax.management.relation.InvalidRelationIdException definition code for javax.management.relation.InvalidRelationIdException - if relation id already used
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if relation type not known in Relation Service
InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException - if:

- the same role name is used for two different roles

- the number of referenced MBeans in given value is less than expected minimum degree

- the number of referenced MBeans in provided value exceeds expected maximum degree

- one referenced MBean in the value is not an Object of the MBean class expected for that role

- an MBean provided for that role does not exist


addRelation sample code for javax.management.relation.RelationService.addRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationService.addRelation(javax.management.ObjectName)

public void addRelation(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theRelObjectName)
                 throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                        RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                        NoSuchMethodException sample code for java.lang.NoSuchMethodException definition code for java.lang.NoSuchMethodException ,
                        InvalidRelationIdException sample code for javax.management.relation.InvalidRelationIdException definition code for javax.management.relation.InvalidRelationIdException ,
                        InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException ,
                        InvalidRelationServiceException sample code for javax.management.relation.InvalidRelationServiceException definition code for javax.management.relation.InvalidRelationServiceException ,
                        RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException ,
                        RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException ,
                        InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException 
Adds an MBean created by the user (and registered by him in the MBean Server) as a relation in the Relation Service.

To be added as a relation, the MBean must conform to the following:

- implement the Relation interface

- have for RelationService ObjectName the ObjectName of current Relation Service

- have a relation id unique and unused in current Relation Service

- have for relation type a relation type created in the Relation Service

- have roles conforming to the role info provided in the relation type.

Specified by:
addRelation sample code for javax.management.relation.RelationServiceMBean.addRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationServiceMBean.addRelation(javax.management.ObjectName) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelObjectName - ObjectName of the relation MBean to be added.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
NoSuchMethodException sample code for java.lang.NoSuchMethodException definition code for java.lang.NoSuchMethodException - If the MBean does not implement the Relation interface
InvalidRelationIdException sample code for javax.management.relation.InvalidRelationIdException definition code for javax.management.relation.InvalidRelationIdException - if:

- no relation identifier in MBean

- the relation identifier is already used in the Relation Service

InstanceNotFoundException sample code for javax.management.InstanceNotFoundException definition code for javax.management.InstanceNotFoundException - if the MBean for given ObjectName has not been registered
InvalidRelationServiceException sample code for javax.management.relation.InvalidRelationServiceException definition code for javax.management.relation.InvalidRelationServiceException - if:

- no Relation Service name in MBean

- the Relation Service name in the MBean is not the one of the current Relation Service

RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if:

- no relation type name in MBean

- the relation type name in MBean does not correspond to a relation type created in the Relation Service

InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException - if:

- the number of referenced MBeans in a role is less than expected minimum degree

- the number of referenced MBeans in a role exceeds expected maximum degree

- one referenced MBean in the value is not an Object of the MBean class expected for that role

- an MBean provided for a role does not exist

RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException - if a value is provided for a role that does not exist in the relation type

isRelationMBean sample code for javax.management.relation.RelationService.isRelationMBean(java.lang.String) definition code for javax.management.relation.RelationService.isRelationMBean(java.lang.String)

public ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  isRelationMBean(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                           throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                  RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
If the relation is represented by an MBean (created by the user and added as a relation in the Relation Service), returns the ObjectName of the MBean.

Specified by:
isRelationMBean sample code for javax.management.relation.RelationServiceMBean.isRelationMBean(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.isRelationMBean(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id identifying the relation
Returns:
ObjectName of the corresponding relation MBean, or null if the relation is not an MBean.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - there is no relation associated to that id

isRelation sample code for javax.management.relation.RelationService.isRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationService.isRelation(javax.management.ObjectName)

public String sample code for java.lang.String definition code for java.lang.String  isRelation(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theObjName)
                  throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Returns the relation id associated to the given ObjectName if the MBean has been added as a relation in the Relation Service.

Specified by:
isRelation sample code for javax.management.relation.RelationServiceMBean.isRelation(javax.management.ObjectName) definition code for javax.management.relation.RelationServiceMBean.isRelation(javax.management.ObjectName) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theObjName - ObjectName of supposed relation
Returns:
relation id (String) or null (if the ObjectName is not a relation handled by the Relation Service)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter

hasRelation sample code for javax.management.relation.RelationService.hasRelation(java.lang.String) definition code for javax.management.relation.RelationService.hasRelation(java.lang.String)

public Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  hasRelation(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                    throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Checks if there is a relation identified in Relation Service with given relation id.

Specified by:
hasRelation sample code for javax.management.relation.RelationServiceMBean.hasRelation(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.hasRelation(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id identifying the relation
Returns:
boolean: true if there is a relation, false else
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter

getAllRelationIds sample code for javax.management.relation.RelationService.getAllRelationIds() definition code for javax.management.relation.RelationService.getAllRelationIds()

public List sample code for java.util.List definition code for java.util.List  getAllRelationIds()
Returns all the relation ids for all the relations handled by the Relation Service.

Specified by:
getAllRelationIds sample code for javax.management.relation.RelationServiceMBean.getAllRelationIds() definition code for javax.management.relation.RelationServiceMBean.getAllRelationIds() in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Returns:
ArrayList of String

checkRoleReading sample code for javax.management.relation.RelationService.checkRoleReading(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.checkRoleReading(java.lang.String, java.lang.String)

public Integer sample code for java.lang.Integer definition code for java.lang.Integer  checkRoleReading(String sample code for java.lang.String definition code for java.lang.String  theRoleName,
                                String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
                         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException 
Checks if given Role can be read in a relation of the given type.

Specified by:
checkRoleReading sample code for javax.management.relation.RelationServiceMBean.checkRoleReading(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.checkRoleReading(java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRoleName - name of role to be checked
theRelTypeName - name of the relation type
Returns:
an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

- 0 if role can be read

- integer corresponding to RoleStatus.NO_ROLE_WITH_NAME

- integer corresponding to RoleStatus.ROLE_NOT_READABLE

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if the relation type is not known in the Relation Service

checkRoleWriting sample code for javax.management.relation.RelationService.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) definition code for javax.management.relation.RelationService.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean)

public Integer sample code for java.lang.Integer definition code for java.lang.Integer  checkRoleWriting(Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole,
                                String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                                Boolean sample code for java.lang.Boolean definition code for java.lang.Boolean  theInitFlg)
                         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException 
Checks if given Role can be set in a relation of given type.

Specified by:
checkRoleWriting sample code for javax.management.relation.RelationServiceMBean.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) definition code for javax.management.relation.RelationServiceMBean.checkRoleWriting(javax.management.relation.Role, java.lang.String, java.lang.Boolean) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRole - role to be checked
theRelTypeName - name of relation type
theInitFlg - flag to specify that the checking is done for the initialization of a role, write access shall not be verified.
Returns:
an Integer wrapping an integer corresponding to possible problems represented as constants in RoleUnresolved:

- 0 if role can be set

- integer corresponding to RoleStatus.NO_ROLE_WITH_NAME

- integer for RoleStatus.ROLE_NOT_WRITABLE

- integer for RoleStatus.LESS_THAN_MIN_ROLE_DEGREE

- integer for RoleStatus.MORE_THAN_MAX_ROLE_DEGREE

- integer for RoleStatus.REF_MBEAN_OF_INCORRECT_CLASS

- integer for RoleStatus.REF_MBEAN_NOT_REGISTERED

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if unknown relation type

sendRelationCreationNotification sample code for javax.management.relation.RelationService.sendRelationCreationNotification(java.lang.String) definition code for javax.management.relation.RelationService.sendRelationCreationNotification(java.lang.String)

public void sendRelationCreationNotification(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                                      throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                             RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Sends a notification (RelationNotification) for a relation creation. The notification type is:

- RelationNotification.RELATION_BASIC_CREATION if the relation is an object internal to the Relation Service

- RelationNotification.RELATION_MBEAN_CREATION if the relation is a MBean added as a relation.

The source object is the Relation Service itself.

It is called in Relation Service createRelation() and addRelation() methods.

Specified by:
sendRelationCreationNotification sample code for javax.management.relation.RelationServiceMBean.sendRelationCreationNotification(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.sendRelationCreationNotification(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation identifier of the updated relation
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if there is no relation for given relation id

sendRoleUpdateNotification sample code for javax.management.relation.RelationService.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationService.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List)

public void sendRoleUpdateNotification(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                                       Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theNewRole,
                                       List sample code for java.util.List definition code for java.util.List  theOldRoleValue)
                                throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                       RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Sends a notification (RelationNotification) for a role update in the given relation. The notification type is:

- RelationNotification.RELATION_BASIC_UPDATE if the relation is an object internal to the Relation Service

- RelationNotification.RELATION_MBEAN_UPDATE if the relation is a MBean added as a relation.

The source object is the Relation Service itself.

It is called in relation MBean setRole() (for given role) and setRoles() (for each role) methods (implementation provided in RelationSupport class).

It is also called in Relation Service setRole() (for given role) and setRoles() (for each role) methods.

Specified by:
sendRoleUpdateNotification sample code for javax.management.relation.RelationServiceMBean.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationServiceMBean.sendRoleUpdateNotification(java.lang.String, javax.management.relation.Role, java.util.List) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation identifier of the updated relation
theNewRole - new role (name and new value)
theOldRoleValue - old role value (List of ObjectName objects)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if there is no relation for given relation id

sendRelationRemovalNotification sample code for javax.management.relation.RelationService.sendRelationRemovalNotification(java.lang.String, java.util.List) definition code for javax.management.relation.RelationService.sendRelationRemovalNotification(java.lang.String, java.util.List)

public void sendRelationRemovalNotification(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                                            List sample code for java.util.List definition code for java.util.List  theUnregMBeanList)
                                     throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                            RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Sends a notification (RelationNotification) for a relation removal. The notification type is:

- RelationNotification.RELATION_BASIC_REMOVAL if the relation is an object internal to the Relation Service

- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is a MBean added as a relation.

The source object is the Relation Service itself.

It is called in Relation Service removeRelation() method.

Specified by:
sendRelationRemovalNotification sample code for javax.management.relation.RelationServiceMBean.sendRelationRemovalNotification(java.lang.String, java.util.List) definition code for javax.management.relation.RelationServiceMBean.sendRelationRemovalNotification(java.lang.String, java.util.List) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation identifier of the updated relation
theUnregMBeanList - List of ObjectNames of MBeans expected to be unregistered due to relation removal (can be null)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if there is no relation for given relation id

updateRoleMap sample code for javax.management.relation.RelationService.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationService.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List)

public void updateRoleMap(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                          Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theNewRole,
                          List sample code for java.util.List definition code for java.util.List  theOldRoleValue)
                   throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                          RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                          RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Handles update of the Relation Service role map for the update of given role in given relation.

It is called in relation MBean setRole() (for given role) and setRoles() (for each role) methods (implementation provided in RelationSupport class).

It is also called in Relation Service setRole() (for given role) and setRoles() (for each role) methods.

To allow the Relation Service to maintain the consistency (in case of MBean unregistration) and to be able to perform queries, this method must be called when a role is updated.

Specified by:
updateRoleMap sample code for javax.management.relation.RelationServiceMBean.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) definition code for javax.management.relation.RelationServiceMBean.updateRoleMap(java.lang.String, javax.management.relation.Role, java.util.List) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation identifier of the updated relation
theNewRole - new role (name and new value)
theOldRoleValue - old role value (List of ObjectName objects)
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation for given id.

removeRelation sample code for javax.management.relation.RelationService.removeRelation(java.lang.String) definition code for javax.management.relation.RelationService.removeRelation(java.lang.String)

public void removeRelation(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                    throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                           IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                           RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Removes given relation from the Relation Service.

A RelationNotification notification is sent, its type being:

- RelationNotification.RELATION_BASIC_REMOVAL if the relation was only internal to the Relation Service

- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is registered as an MBean.

For MBeans referenced in such relation, nothing will be done,

Specified by:
removeRelation sample code for javax.management.relation.RelationServiceMBean.removeRelation(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.removeRelation(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id of the relation to be removed
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation corresponding to given relation id

purgeRelations sample code for javax.management.relation.RelationService.purgeRelations() definition code for javax.management.relation.RelationService.purgeRelations()

public void purgeRelations()
                    throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException 
Purges the relations.

Depending on the purgeFlag value, this method is either called automatically when a notification is received for the unregistration of an MBean referenced in a relation (if the flag is set to true), or not (if the flag is set to false).

In that case it is up to the user to call it to maintain the consistency of the relations. To be kept in mind that if an MBean is unregistered and the purge not done immediately, if the ObjectName is reused and assigned to another MBean referenced in a relation, calling manually this purgeRelations() method will cause trouble, as will consider the ObjectName as corresponding to the unregistered MBean, not seeing the new one.

The behavior depends on the cardinality of the role where the unregistered MBean is referenced:

- if removing one MBean reference in the role makes its number of references less than the minimum degree, the relation has to be removed.

- if the remaining number of references after removing the MBean reference is still in the cardinality range, keep the relation and update it calling its handleMBeanUnregistration() callback.

Specified by:
purgeRelations sample code for javax.management.relation.RelationServiceMBean.purgeRelations() definition code for javax.management.relation.RelationServiceMBean.purgeRelations() in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server.

findReferencingRelations sample code for javax.management.relation.RelationService.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String)

public Map sample code for java.util.Map definition code for java.util.Map  findReferencingRelations(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theMBeanName,
                                    String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                                    String sample code for java.lang.String definition code for java.lang.String  theRoleName)
                             throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Retrieves the relations where a given MBean is referenced.

This corresponds to the CIM "References" and "ReferenceNames" operations.

Specified by:
findReferencingRelations sample code for javax.management.relation.RelationServiceMBean.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.findReferencingRelations(javax.management.ObjectName, java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theMBeanName - ObjectName of MBean
theRelTypeName - can be null; if specified, only the relations of that type will be considered in the search. Else all relation types are considered.
theRoleName - can be null; if specified, only the relations where the MBean is referenced in that role will be returned. Else all roles are considered.
Returns:
an HashMap, where the keys are the relation ids of the relations where the MBean is referenced, and the value is, for each key, an ArrayList of role names (as an MBean can be referenced in several roles in the same relation).
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter

findAssociatedMBeans sample code for javax.management.relation.RelationService.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String)

public Map sample code for java.util.Map definition code for java.util.Map  findAssociatedMBeans(ObjectName sample code for javax.management.ObjectName definition code for javax.management.ObjectName  theMBeanName,
                                String sample code for java.lang.String definition code for java.lang.String  theRelTypeName,
                                String sample code for java.lang.String definition code for java.lang.String  theRoleName)
                         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException 
Retrieves the MBeans associated to given one in a relation.

This corresponds to CIM Associators and AssociatorNames operations.

Specified by:
findAssociatedMBeans sample code for javax.management.relation.RelationServiceMBean.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.findAssociatedMBeans(javax.management.ObjectName, java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theMBeanName - ObjectName of MBean
theRelTypeName - can be null; if specified, only the relations of that type will be considered in the search. Else all relation types are considered.
theRoleName - can be null; if specified, only the relations where the MBean is referenced in that role will be considered. Else all roles are considered.
Returns:
an HashMap, where the keys are the ObjectNames of the MBeans associated to given MBean, and the value is, for each key, an ArrayList of the relation ids of the relations where the key MBean is associated to given one (as they can be associated in several different relations).
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter

findRelationsOfType sample code for javax.management.relation.RelationService.findRelationsOfType(java.lang.String) definition code for javax.management.relation.RelationService.findRelationsOfType(java.lang.String)

public List sample code for java.util.List definition code for java.util.List  findRelationsOfType(String sample code for java.lang.String definition code for java.lang.String  theRelTypeName)
                         throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException 
Returns the relation ids for relations of the given type.

Specified by:
findRelationsOfType sample code for javax.management.relation.RelationServiceMBean.findRelationsOfType(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.findRelationsOfType(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelTypeName - relation type name
Returns:
an ArrayList of relation ids.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationTypeNotFoundException sample code for javax.management.relation.RelationTypeNotFoundException definition code for javax.management.relation.RelationTypeNotFoundException - if there is no relation type with that name.

getRole sample code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String)

public List sample code for java.util.List definition code for java.util.List  getRole(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                    String sample code for java.lang.String definition code for java.lang.String  theRoleName)
             throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                    IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                    RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException ,
                    RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException 
Retrieves role value for given role name in given relation.

Specified by:
getRole sample code for javax.management.relation.RelationServiceMBean.getRole(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getRole(java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
theRoleName - name of role
Returns:
the ArrayList of ObjectName objects being the role value
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation with given id
RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException - if:

- there is no role with given name

or

- the role is not readable.

See Also:
setRole(java.lang.String, javax.management.relation.Role) sample code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role) definition code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role)

getRoles sample code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[]) definition code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[])

public RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult  getRoles(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                           String sample code for java.lang.String definition code for java.lang.String [] theRoleNameArray)
                    throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                           IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                           RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Retrieves values of roles with given names in given relation.

Specified by:
getRoles sample code for javax.management.relation.RelationServiceMBean.getRoles(java.lang.String, java.lang.String[]) definition code for javax.management.relation.RelationServiceMBean.getRoles(java.lang.String, java.lang.String[]) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
theRoleNameArray - array of names of roles to be retrieved
Returns:
a RoleResult object, including a RoleList (for roles successfully retrieved) and a RoleUnresolvedList (for roles not retrieved).
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation with given id
See Also:
setRoles(java.lang.String, javax.management.relation.RoleList) sample code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList)

getAllRoles sample code for javax.management.relation.RelationService.getAllRoles(java.lang.String) definition code for javax.management.relation.RelationService.getAllRoles(java.lang.String)

public RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult  getAllRoles(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                       throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                              RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException ,
                              RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException 
Returns all roles present in the relation.

Specified by:
getAllRoles sample code for javax.management.relation.RelationServiceMBean.getAllRoles(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getAllRoles(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
Returns:
a RoleResult object, including a RoleList (for roles successfully retrieved) and a RoleUnresolvedList (for roles not readable).
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation for given id
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server

getRoleCardinality sample code for javax.management.relation.RelationService.getRoleCardinality(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRoleCardinality(java.lang.String, java.lang.String)

public Integer sample code for java.lang.Integer definition code for java.lang.Integer  getRoleCardinality(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                                  String sample code for java.lang.String definition code for java.lang.String  theRoleName)
                           throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                  RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException ,
                                  RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException 
Retrieves the number of MBeans currently referenced in the given role.

Specified by:
getRoleCardinality sample code for javax.management.relation.RelationServiceMBean.getRoleCardinality(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getRoleCardinality(java.lang.String, java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
theRoleName - name of role
Returns:
the number of currently referenced MBeans in that role
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation with given id
RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException - if there is no role with given name

setRole sample code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role) definition code for javax.management.relation.RelationService.setRole(java.lang.String, javax.management.relation.Role)

public void setRole(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                    Role sample code for javax.management.relation.Role definition code for javax.management.relation.Role  theRole)
             throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                    IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                    RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException ,
                    RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException ,
                    InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException 
Sets the given role in given relation.

Will check the role according to its corresponding role definition provided in relation's relation type

The Relation Service will keep track of the change to keep the consistency of relations by handling referenced MBean unregistrations.

Specified by:
setRole sample code for javax.management.relation.RelationServiceMBean.setRole(java.lang.String, javax.management.relation.Role) definition code for javax.management.relation.RelationServiceMBean.setRole(java.lang.String, javax.management.relation.Role) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
theRole - role to be set (name and new value)
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation with given id
RoleNotFoundException sample code for javax.management.relation.RoleNotFoundException definition code for javax.management.relation.RoleNotFoundException - if the role does not exist or is not writable
InvalidRoleValueException sample code for javax.management.relation.InvalidRoleValueException definition code for javax.management.relation.InvalidRoleValueException - if value provided for role is not valid:

- the number of referenced MBeans in given value is less than expected minimum degree

or

- the number of referenced MBeans in provided value exceeds expected maximum degree

or

- one referenced MBean in the value is not an Object of the MBean class expected for that role

or

- an MBean provided for that role does not exist

See Also:
getRole(java.lang.String, java.lang.String) sample code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String) definition code for javax.management.relation.RelationService.getRole(java.lang.String, java.lang.String)

setRoles sample code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationService.setRoles(java.lang.String, javax.management.relation.RoleList)

public RoleResult sample code for javax.management.relation.RoleResult definition code for javax.management.relation.RoleResult  setRoles(String sample code for java.lang.String definition code for java.lang.String  theRelId,
                           RoleList sample code for javax.management.relation.RoleList definition code for javax.management.relation.RoleList  theRoleList)
                    throws RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException ,
                           IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                           RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Sets the given roles in given relation.

Will check the role according to its corresponding role definition provided in relation's relation type

The Relation Service keeps track of the changes to keep the consistency of relations by handling referenced MBean unregistrations.

Specified by:
setRoles sample code for javax.management.relation.RelationServiceMBean.setRoles(java.lang.String, javax.management.relation.RoleList) definition code for javax.management.relation.RelationServiceMBean.setRoles(java.lang.String, javax.management.relation.RoleList) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
theRoleList - list of roles to be set
Returns:
a RoleResult object, including a RoleList (for roles successfully set) and a RoleUnresolvedList (for roles not set).
Throws:
RelationServiceNotRegisteredException sample code for javax.management.relation.RelationServiceNotRegisteredException definition code for javax.management.relation.RelationServiceNotRegisteredException - if the Relation Service is not registered in the MBean Server
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation with given id
See Also:
getRoles(java.lang.String, java.lang.String[]) sample code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[]) definition code for javax.management.relation.RelationService.getRoles(java.lang.String, java.lang.String[])

getReferencedMBeans sample code for javax.management.relation.RelationService.getReferencedMBeans(java.lang.String) definition code for javax.management.relation.RelationService.getReferencedMBeans(java.lang.String)

public Map sample code for java.util.Map definition code for java.util.Map  getReferencedMBeans(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                        throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                               RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Retrieves MBeans referenced in the various roles of the relation.

Specified by:
getReferencedMBeans sample code for javax.management.relation.RelationServiceMBean.getReferencedMBeans(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getReferencedMBeans(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
Returns:
a HashMap mapping:

ObjectName -> ArrayList of String (role names)

Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation for given relation id

getRelationTypeName sample code for javax.management.relation.RelationService.getRelationTypeName(java.lang.String) definition code for javax.management.relation.RelationService.getRelationTypeName(java.lang.String)

public String sample code for java.lang.String definition code for java.lang.String  getRelationTypeName(String sample code for java.lang.String definition code for java.lang.String  theRelId)
                           throws IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException ,
                                  RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException 
Returns name of associated relation type for given relation.

Specified by:
getRelationTypeName sample code for javax.management.relation.RelationServiceMBean.getRelationTypeName(java.lang.String) definition code for javax.management.relation.RelationServiceMBean.getRelationTypeName(java.lang.String) in interface RelationServiceMBean sample code for javax.management.relation.RelationServiceMBean definition code for javax.management.relation.RelationServiceMBean
Parameters:
theRelId - relation id
Returns:
the name of the associated relation type.
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - if null parameter
RelationNotFoundException sample code for javax.management.relation.RelationNotFoundException definition code for javax.management.relation.RelationNotFoundException - if no relation for given relation id

handleNotification sample code for javax.management.relation.RelationService.handleNotification(javax.management.Notification, java.lang.Object) definition code for javax.management.relation.RelationService.handleNotification(javax.management.Notification, java.lang.Object)

public void handleNotification(Notification sample code for javax.management.Notification definition code for javax.management.Notification  theNtf,
                               Object sample code for java.lang.Object definition code for java.lang.Object  theHandback)
Invoked when a JMX notification occurs. Currently handles notifications for unregistration of MBeans, either referenced in a relation role or being a relation itself.

Specified by:
handleNotification sample code for javax.management.NotificationListener.handleNotification(javax.management.Notification, java.lang.Object) definition code for javax.management.NotificationListener.handleNotification(javax.management.Notification, java.lang.Object) in interface NotificationListener sample code for javax.management.NotificationListener definition code for javax.management.NotificationListener
Parameters:
theNtf - The notification.
theHandback - An opaque object which helps the listener to associate information regarding the MBean emitter (can be null).

getNotificationInfo sample code for javax.management.relation.RelationService.getNotificationInfo() definition code for javax.management.relation.RelationService.getNotificationInfo()

public MBeanNotificationInfo sample code for javax.management.MBeanNotificationInfo definition code for javax.management.MBeanNotificationInfo [] getNotificationInfo()
Returns a NotificationInfo object containing the name of the Java class of the notification and the notification types sent.

Specified by:
getNotificationInfo sample code for javax.management.NotificationBroadcaster.getNotificationInfo() definition code for javax.management.NotificationBroadcaster.getNotificationInfo() in interface NotificationBroadcaster sample code for javax.management.NotificationBroadcaster definition code for javax.management.NotificationBroadcaster
Overrides:
getNotificationInfo sample code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() definition code for javax.management.NotificationBroadcasterSupport.getNotificationInfo() in class NotificationBroadcasterSupport sample code for javax.management.NotificationBroadcasterSupport definition code for javax.management.NotificationBroadcasterSupport
Returns:
the array of possible notifications.