Lines Matching defs:relation

26 package javax.management.relation;
58 * The Relation Service is in charge of creating and deleting relation types
62 * NotificationBroadcasterSupport to send notifications when a relation is
65 * notifications concerning unregistration of MBeans referenced in relation
66 * roles and of relation MBeans.
80 // <relation id> -> <RelationSupport object/ObjectName>
81 // depending if the relation has been created using createRelation()
82 // method (so internally handled) or is an MBean added as a relation by the
87 // <relation id> -> <relation type name>
91 // <relation MBean Object Name> -> <relation id>
96 // <relation type name> -> <RelationType object>
101 // <relation type name> -> ArrayList of <relation id>
109 // <relation id> -> ArrayList of <role name>
116 // unregistration of an MBean referenced in a relation, if an immediate
125 // - a relation handled by the Relation Service
152 * received for the unregistration of an MBean referenced in a relation, if
181 // MBean Server not set by preRegister(): relation service not
228 * unregistration of an MBean referenced in a relation, if an immediate
244 * unregistration of an MBean referenced in a relation, if an immediate
265 * Creates a relation type (a RelationTypeSupport object) with given
269 * @param relationTypeName name of the relation type
274 * <P>- there is already a relation type with that name
304 * Adds given object as a relation type. The object is expected to
307 * @param relationTypeObj relation type object (implementing the
317 * <P>- there is already a relation type with that name
355 * Retrieves names of all known relation types.
357 * @return ArrayList of relation type names (Strings)
368 * Retrieves list of role infos (RoleInfo objects) of a given relation
371 * @param relationTypeName name of relation type
376 * @exception RelationTypeNotFoundException if there is no relation type
400 * Retrieves role info for given role name of a given relation type.
402 * @param relationTypeName name of relation type
408 * @exception RelationTypeNotFoundException if the relation type is not
411 * relation type.
439 * Removes given relation type from Relation Service.
440 * <P>The relation objects of that type will be removed from the
443 * @param relationTypeName name of the relation type to be removed
448 * @exception RelationTypeNotFoundException If there is no relation type
467 // Checks if the relation type to be removed exists
471 // Retrieves the relation ids for relations of that type
483 // Removes the relation type from all maps
517 * Creates a simple relation (represented by a RelationSupport object) of
518 * given relation type, and adds it in the Relation Service.
524 * @param relationId relation identifier, to identify uniquely the relation
526 * @param relationTypeName name of the relation type (has to be created
528 * @param roleList role list to initialize roles of the relation (can
536 * that does not exist in the relation type
537 * @exception InvalidRelationIdException if relation id already used
538 * @exception RelationTypeNotFoundException if relation type not known in
580 // Adds relation object as a relation into the Relation Service
598 * Server) as a relation in the Relation Service.
599 * <P>To be added as a relation, the MBean must conform to the
604 * <P>- have a relation id unique and unused in current Relation Service
605 * <P>- have for relation type a relation type created in the Relation
607 * <P>- have roles conforming to the role info provided in the relation
610 * @param relationObjectName ObjectName of the relation MBean to be added.
618 * <P>- no relation identifier in MBean
619 * <P>- the relation identifier is already used in the Relation Service
627 * <P>- no relation type name in MBean
628 * <P>- the relation type name in MBean does not correspond to a relation
639 * that does not exist in the relation type
663 // Checks that the relation MBean implements the Relation interface.
666 if ((!(myMBeanServer.isInstanceOf(relationObjectName, "javax.management.relation.Relation")))) {
670 // Checks there is a relation id in the relation MBean (its uniqueness
690 String excMsg = "This MBean does not provide a relation id.";
693 // Checks that the Relation Service where the relation MBean is
724 // Checks that a relation type has been specified for the relation
742 String excMsg = "No relation type provided.";
770 // Adds relation MBean ObjectName in map
775 // Updates flag to specify that the relation is managed by the Relation
800 * If the relation is represented by an MBean (created by the user and
801 * added as a relation in the Relation Service), returns the ObjectName of
804 * @param relationId relation id identifying the relation
806 * @return ObjectName of the corresponding relation MBean, or null if
807 * the relation is not an MBean.
810 * @exception RelationNotFoundException there is no relation associated
835 * Returns the relation id associated to the given ObjectName if the
836 * MBean has been added as a relation in the Relation Service.
838 * @param objectName ObjectName of supposed relation
840 * @return relation id (String) or null (if the ObjectName is not a
841 * relation handled by the Relation Service)
867 * Checks if there is a relation identified in Relation Service with given
868 * relation id.
870 * @param relationId relation id identifying the relation
872 * @return boolean: true if there is a relation, false else
897 * Returns all the relation ids for all the relations handled by the
911 * Checks if given Role can be read in a relation of the given type.
914 * @param relationTypeName name of the relation type
923 * @exception RelationTypeNotFoundException if the relation type is not
965 * Checks if given Role can be set in a relation of given type.
968 * @param relationTypeName name of relation type
983 * @exception RelationTypeNotFoundException if unknown relation type
1033 * Sends a notification (RelationNotification) for a relation creation.
1035 * <P>- RelationNotification.RELATION_BASIC_CREATION if the relation is an
1037 * <P>- RelationNotification.RELATION_MBEAN_CREATION if the relation is a
1038 * MBean added as a relation.
1043 * @param relationId relation identifier of the updated relation
1046 * @exception RelationNotFoundException if there is no relation for given
1047 * relation id
1062 StringBuilder ntfMsg = new StringBuilder("Creation of relation ");
1081 * given relation. The notification type is:
1082 * <P>- RelationNotification.RELATION_BASIC_UPDATE if the relation is an
1084 * <P>- RelationNotification.RELATION_MBEAN_UPDATE if the relation is a
1085 * MBean added as a relation.
1087 * <P>It is called in relation MBean setRole() (for given role) and
1093 * @param relationId relation identifier of the updated relation
1098 * @exception RelationNotFoundException if there is no relation for given
1099 * relation id
1148 * Sends a notification (RelationNotification) for a relation removal.
1150 * <P>- RelationNotification.RELATION_BASIC_REMOVAL if the relation is an
1152 * <P>- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is a
1153 * MBean added as a relation.
1157 * @param relationId relation identifier of the updated relation
1159 * to be unregistered due to relation removal (can be null)
1162 * @exception RelationNotFoundException if there is no relation for given
1163 * relation id
1181 "Removal of relation " + relationId,
1196 * role in given relation.
1197 * <P>It is called in relation MBean setRole() (for given role) and
1206 * @param relationId relation identifier of the updated relation
1213 * @exception RelationNotFoundException if no relation for given id.
1235 // Verifies the relation has been added in the Relation Service
1289 // relation
1312 * Removes given relation from the Relation Service.
1314 * <P>- RelationNotification.RELATION_BASIC_REMOVAL if the relation was
1316 * <P>- RelationNotification.RELATION_MBEAN_REMOVAL if the relation is
1318 * <P>For MBeans referenced in such relation, nothing will be done,
1320 * @param relationId relation id of the relation to be removed
1325 * @exception RelationNotFoundException if no relation corresponding to
1326 * given relation id
1344 // Checks there is a relation with this id
1357 // Note: has to be done FIRST as needs the relation to be still in the
1362 // deleting the relation can mean to delete referenced MBeans. In
1369 // Removes the relation from various internal maps
1372 // Retrieves the MBeans referenced in this relation
1374 // require to know the MBeans referenced in the relation. For
1376 // on the relation itself. Ok if it is an internal one, but if
1380 // List of MBeans no longer referenced in any relation, to be
1419 // - ObjectName to relation id map
1425 // Relation id to relation type name map
1426 // First retrieves the relation type name
1432 // - Relation type name to relation id map
1439 // No other relation of that type
1455 * an MBean referenced in a relation (if the flag is set to true), or not
1460 * reused and assigned to another MBean referenced in a relation, calling
1468 * references less than the minimum degree, the relation has to be removed.
1470 * reference is still in the cardinality range, keep the relation and
1487 // possible that the relation itself or other referenced MBeans
1511 // referencing relation ids and roles
1524 // Retrieves the associated map of relation ids and roles
1545 // List of relation ids where the unregistered MBean is
1550 // List of roles of the relation where the MBean is
1554 // Checks if the relation has to be removed or not,
1557 // If the relation is kept, calls
1558 // handleMBeanUnregistration() callback of the relation to
1589 * of that type will be considered in the search. Else all relation types
1595 * @return an HashMap, where the keys are the relation ids of the relations
1598 * roles in the same relation).
1630 // List of relation ids of interest regarding the selected
1631 // relation type
1641 // Considers only the relation ids for relations of given
1645 // Retrieves its relation type
1693 * Retrieves the MBeans associated to given one in a relation.
1699 * relation types are considered.
1706 * of the relation ids of the relations where the key MBean is
1727 // Retrieves the map <relation id> -> <role names> for those
1739 // Retrieves ObjectNames of MBeans referenced in this relation
1750 // For each MBean associated to given one in a relation, adds the
1751 // association <ObjectName> -> <relation id> into result map
1757 // one in another relation
1778 * Returns the relation ids for relations of the given type.
1780 * @param relationTypeName relation type name
1782 * @return an ArrayList of relation ids.
1785 * @exception RelationTypeNotFoundException if there is no relation type
1818 * Retrieves role value for given role name in given relation.
1820 * @param relationId relation id
1828 * @exception RelationNotFoundException if no relation with given id
1860 // Internal relation
1907 * Retrieves values of roles with given names in given relation.
1909 * @param relationId relation id
1919 * @exception RelationNotFoundException if no relation with given id
1946 // Internal relation
1984 * Returns all roles present in the relation.
1986 * @param relationId relation id
1993 * @exception RelationNotFoundException if no relation for given id
2016 // Internal relation
2038 * @param relationId relation id
2044 * @exception RelationNotFoundException if no relation with given id
2067 // Internal relation
2107 * Sets the given role in given relation.
2109 * provided in relation's relation type
2113 * @param relationId relation id
2119 * @exception RelationNotFoundException if no relation with given id
2160 // Internal relation
2166 // (as relation exists in the RS, its relation type is known)
2182 signature[0] = "javax.management.relation.Role";
2219 * Sets the given roles in given relation.
2221 * provided in relation's relation type
2225 * @param relationId relation id
2235 * @exception RelationNotFoundException if no relation with given id
2262 // Internal relation
2265 // Shall not throw RelationTypeNotFoundException (as relation is
2266 // known, its relation type exists)
2280 signature[0] = "javax.management.relation.RoleList";
2304 * Retrieves MBeans referenced in the various roles of the relation.
2306 * @param relationId relation id
2313 * @exception RelationNotFoundException if no relation for given
2314 * relation id
2335 // Internal relation
2356 * Returns name of associated relation type for given relation.
2358 * @param relationId relation id
2360 * @return the name of the associated relation type.
2363 * @exception RelationNotFoundException if no relation for given
2364 * relation id
2384 // Internal relation
2411 * referenced in a relation role or being a relation itself.
2462 // Note: do both tests as a relation can be an MBean and be
2463 // itself referenced in another relation :)
2469 // Unregistration of a relation MBean
2502 String ntfClass = "javax.management.relation.RelationNotification";
2513 String ntfDesc = "Sent when a relation is created, updated or deleted.";
2527 // Adds given object as a relation type.
2529 // -param relationTypeObj relation type object
2532 // -exception InvalidRelationTypeException if there is already a relation
2548 // Checks that there is not already a relation type with that name
2555 String excMsg = "There is already a relation type in the Relation Service with name ";
2565 // Adds the relation type
2579 // Retrieves relation type with given name
2581 // -param relationTypeName expected name of a relation type created in the
2587 // -exception RelationTypeNotFoundException if no relation type for that
2602 // No null relation type accepted, so can use get()
2609 String excMsg = "No relation type created in the Relation Service with the name ";
2620 // Retrieves relation corresponding to given relation id.
2622 // - a RelationSupport object if the relation is internal
2626 // -param relationId expected relation id
2628 // -return RelationSupport object or ObjectName of relation with given id
2631 // -exception RelationNotFoundException if no relation for that
2632 // relation id created in Relation Service
2646 // No null relation accepted, so can use get()
2653 String excMsg = "No relation associated to relation id " + relationId;
2666 // -param relationId relation id of the relation where the MBean is
2702 // MBean not referenced in any relation yet
2707 // relation
2718 // MBean already referenced in at least another relation
2720 // relation
2724 // MBean not referenced in current relation
2727 // relation
2731 // Adds new reference done in current relation
2735 // MBean already referenced in current relation in another
2752 // -param relationId relation id of the relation where the MBean was
2756 // roles in the relation, not only for the one above
2759 // - true if the MBean is no longer reference in any relation
2784 // Retrieves the set of relations (designed via their relation ids)
2801 // Now retrieves the roles of current relation where the MBean
2812 // Checks if there is still at least one role in current relation
2815 // MBean no longer referenced in current relation: removes
2820 // Checks if the MBean is still referenced in at least on relation
2822 // MBean no longer referenced in any relation: removes entry
2945 // Adds a relation (being either a RelationSupport object or an MBean
2948 // - RelationNotification.RELATION_BASIC_CREATION for internal relation
2951 // as a relation.
2953 // -param relationBaseFlag flag true if the relation is a RelationSupport
2955 // -param relationObj RelationSupport object (if relation is internal)
2956 // -param relationObjName ObjectName of the MBean to be added as a relation
2957 // (only for the relation MBean)
2958 // -param relationId relation identifier, to uniquely identify the relation
2960 // -param relationTypeName name of the relation type (has to be created
2962 // -param roleList role list to initialize roles of the relation
2969 // that does not exist in the relation type
2970 // -exception InvalidRelationIdException if relation id already used
2971 // -exception RelationTypeNotFoundException if relation type not known in
3014 // Checks if there is already a relation with given id
3020 // There is already a relation with that id
3021 String excMsg = "There is already a relation with id ";
3030 // Retrieves the relation type
3035 // the relation type
3036 // First retrieves a local list of the role infos of the relation type
3039 // to have an empty relation type.
3087 // Creation of relation successfull!!!!
3093 // Note: do not clone relation object, created by us :)
3100 // Relation id to relation type name map
3106 // Relation type to relation id map
3121 // Referenced MBean to relation id map
3139 // Sends a notification for relation creation
3248 // referenced MBeans, relation MBeans and the Relation Service are
3286 // ArrayList of ObjectNames) in given relation.
3291 // -param relationBaseFlag flag true if the relation is a RelationSupport
3293 // -param relationObj RelationSupport object (if relation is internal)
3294 // -param relationObjName ObjectName of the MBean to be added as a relation
3295 // (only for the relation MBean)
3296 // -param relationId relation id
3297 // -param relationTypeName name of the relation type (has to be created
3341 // role list provided by the user), try to set in the relation a role
3356 // Internal relation
3380 signature[0] = "javax.management.relation.Role";
3390 // the relation MBeans are registered in the same MBean Server.
3453 excMsgPart = " does not exist in relation.";
3501 // -param relationId relation id of the created/updated/deleted relation
3503 // expected to be unregistered due to relation removal (only for removal,
3510 // -exception RelationNotFoundException if no relation for given id
3537 // Note: do not use getRelationTypeName() as if it is a relation MBean
3544 // ObjectName (for a relation MBean)
3626 // in parameter, if the relation has to be removed or not, regarding
3629 // If the relation is kept, calls handleMBeanUnregistration() callback of
3630 // the relation to update it.
3632 // -param relationId relation id
3640 // -exception RelationNotFoundException if unknown relation id
3642 // not exist in the relation
3665 // Retrieves the relation type name of the relation
3669 // Retrieves the relation
3673 // Flag to specify if the relation has to be deleted
3711 // The relation has to be deleted
3717 // Removes the relation
3722 // Updates each role in the relation using
3726 // list for a referenced MBean in a relation, NOT a
3736 // Internal relation