📄 relationservicembean.html
字号:
type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelTypeName</CODE> - name of relation type<DT><B>Returns:</B><DD>ArrayList of RoleInfo.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null parameter<DD><CODE><A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - if there is no relation type with that name.</DL></DD></DL><HR><A NAME="getRoleInfo(java.lang.String, java.lang.String)"><!-- --></A><H3>getRoleInfo</H3><PRE>public <A HREF="../../../javax/management/relation/RoleInfo.html" title="class in javax.management.relation">RoleInfo</A> <B>getRoleInfo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRelTypeName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRoleInfoName) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>, <A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A>, <A HREF="../../../javax/management/relation/RoleInfoNotFoundException.html" title="class in javax.management.relation">RoleInfoNotFoundException</A></PRE><DL><DD>Retrieves role info for given role of a given relation type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelTypeName</CODE> - name of relation type<DD><CODE>theRoleInfoName</CODE> - name of role<DT><B>Returns:</B><DD>RoleInfo object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null parameter<DD><CODE><A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - if the relation type is not known in the Relation Service<DD><CODE><A HREF="../../../javax/management/relation/RoleInfoNotFoundException.html" title="class in javax.management.relation">RoleInfoNotFoundException</A></CODE> - if the role is not part of the relation type.</DL></DD></DL><HR><A NAME="removeRelationType(java.lang.String)"><!-- --></A><H3>removeRelationType</H3><PRE>public void <B>removeRelationType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRelTypeName) throws <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>, <A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></PRE><DL><DD>Removes given relation type from Relation Service. <P>The relation objects of that type will be removed from the Relation Service.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelTypeName</CODE> - name of the relation type to be removed<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A></CODE> - if the Relation Service is not registered in the MBean Server<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null parameter<DD><CODE><A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - If there is no relation type with that name</DL></DD></DL><HR><A NAME="createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList)"><!-- --></A><H3>createRelation</H3><PRE>public void <B>createRelation</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRelId, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRelTypeName, <A HREF="../../../javax/management/relation/RoleList.html" title="class in javax.management.relation">RoleList</A> theRoleList) throws <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>, <A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A>, <A HREF="../../../javax/management/relation/InvalidRelationIdException.html" title="class in javax.management.relation">InvalidRelationIdException</A>, <A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A>, <A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></PRE><DL><DD>Creates a simple relation (represented by a RelationSupport object) of given relation type, and adds it in the Relation Service. <P>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. <P>A RelationNotification, with type RELATION_BASIC_CREATION, is sent.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelId</CODE> - relation identifier, to identify uniquely the relation inside the Relation Service<DD><CODE>theRelTypeName</CODE> - name of the relation type (has to be created in the Relation Service)<DD><CODE>theRoleList</CODE> - role list to initialize roles of the relation (can be null).<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A></CODE> - if the Relation Service is not registered in the MBean Server<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null paramater<DD><CODE><A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></CODE> - if a value is provided for a role that does not exist in the relation type<DD><CODE><A HREF="../../../javax/management/relation/InvalidRelationIdException.html" title="class in javax.management.relation">InvalidRelationIdException</A></CODE> - if relation id already used<DD><CODE><A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - if relation type not known in Relation Service<DD><CODE><A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></CODE> - if: <P>- the same role name is used for two different roles <P>- the number of referenced MBeans in given value is less than expected minimum degree <P>- the number of referenced MBeans in provided value exceeds expected maximum degree <P>- one referenced MBean in the value is not an Object of the MBean class expected for that role <P>- an MBean provided for that role does not exist</DL></DD></DL><HR><A NAME="addRelation(javax.management.ObjectName)"><!-- --></A><H3>addRelation</H3><PRE>public void <B>addRelation</B>(<A HREF="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> theRelObjectName) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>, <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NoSuchMethodException.html" title="class or interface in java.lang">NoSuchMethodException</A>, <A HREF="../../../javax/management/relation/InvalidRelationIdException.html" title="class in javax.management.relation">InvalidRelationIdException</A>, <A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A>, <A HREF="../../../javax/management/relation/InvalidRelationServiceException.html" title="class in javax.management.relation">InvalidRelationServiceException</A>, <A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A>, <A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A>, <A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></PRE><DL><DD>Adds an MBean created by the user (and registered by him in the MBean Server) as a relation in the Relation Service. <P>To be added as a relation, the MBean must conform to the following: <P>- implement the Relation interface <P>- have for RelationService ObjectName the ObjectName of current Relation Service <P>- have a relation id that is unique and unused in current Relation Service <P>- have for relation type a relation type created in the Relation Service <P>- have roles conforming to the role info provided in the relation type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelObjectName</CODE> - ObjectName of the relation MBean to be added.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null parameter<DD><CODE><A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A></CODE> - if the Relation Service is not registered in the MBean Server<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NoSuchMethodException.html" title="class or interface in java.lang">NoSuchMethodException</A></CODE> - If the MBean does not implement the Relation interface<DD><CODE><A HREF="../../../javax/management/relation/InvalidRelationIdException.html" title="class in javax.management.relation">InvalidRelationIdException</A></CODE> - if: <P>- no relation identifier in MBean <P>- the relation identifier is already used in the Relation Service<DD><CODE><A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></CODE> - if the MBean for given ObjectName has not been registered<DD><CODE><A HREF="../../../javax/management/relation/InvalidRelationServiceException.html" title="class in javax.management.relation">InvalidRelationServiceException</A></CODE> - if: <P>- no Relation Service name in MBean <P>- the Relation Service name in the MBean is not the one of the current Relation Service<DD><CODE><A HREF="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - if: <P>- no relation type name in MBean <P>- the relation type name in MBean does not correspond to a relation type created in the Relation Service<DD><CODE><A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></CODE> - if: <P>- the number of referenced MBeans in a role is less than expected minimum degree <P>- the number of referenced MBeans in a role exceeds expected maximum degree <P>- one referenced MBean in the value is not an Object of the MBean class expected for that role <P>- an MBean provided for a role does not exist<DD><CODE><A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></CODE> - if a value is provided for a role that does not exist in the relation type</DL></DD></DL><HR><A NAME="isRelationMBean(java.lang.String)"><!-- --></A><H3>isRelationMBean</H3><PRE>public <A HREF="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> <B>isRelationMBean</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRelId) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A>, <A HREF="../../../javax/management/relation/RelationNotFoundException.html" title="class in javax.management.relation">RelationNotFoundException</A></PRE><DL><DD>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.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelId</CODE> - relation id identifying the relation<DT><B>Returns:</B><DD>ObjectName of the corresponding relation MBean, or null if the relation is not an MBean.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if null parameter<DD><CODE><A HREF="../../../javax/management/relation/RelationNotFoundException.html" title="class in javax.management.relation">RelationNotFoundException</A></CODE> - there is no relation associated to that id</DL></DD></DL><HR><A NAME="isRelation(javax.management.ObjectName)"><!-- --></A><H3>isRelation</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>isRelation</B>(<A HREF="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> theObjName) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -