📄 relationservice.html
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>theRelTypeName</CODE> - name of the relation type<DD><CODE>theRoleInfoArray</CODE> - array of role infos<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/InvalidRelationTypeException.html" title="class in javax.management.relation">InvalidRelationTypeException</A></CODE> - If: <P>- there is already a relation type with that name <P>- the same name has been used for two different role infos <P>- no role info provided <P>- one null role info provided</DL></DD></DL><HR><A NAME="addRelationType(javax.management.relation.RelationType)"><!-- --></A><H3>addRelationType</H3><PRE>public void <B>addRelationType</B>(<A HREF="../../../javax/management/relation/RelationType.html" title="interface in javax.management.relation">RelationType</A> theRelTypeObj) 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/InvalidRelationTypeException.html" title="class in javax.management.relation">InvalidRelationTypeException</A></PRE><DL><DD>Adds given object as a relation type. The object is expected to implement the RelationType interface.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#addRelationType(javax.management.relation.RelationType)">addRelationType</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>theRelTypeObj</CODE> - relation type object (implementing the RelationType interface)<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/InvalidRelationTypeException.html" title="class in javax.management.relation">InvalidRelationTypeException</A></CODE> - if: <P>- the same name has been used for two different roles <P>- no role info provided <P>- one null role info provided <P>- there is already a relation type with that name</DL></DD></DL><HR><A NAME="getAllRelationTypeNames()"><!-- --></A><H3>getAllRelationTypeNames</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>getAllRelationTypeNames</B>()</PRE><DL><DD>Retrieves names of all known relation types.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#getAllRelationTypeNames()">getAllRelationTypeNames</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>ArrayList of relation type names (Strings)</DL></DD></DL><HR><A NAME="getRoleInfos(java.lang.String)"><!-- --></A><H3>getRoleInfos</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>getRoleInfos</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="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>Retrieves list of role infos (RoleInfo objects) of a given relation type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#getRoleInfos(java.lang.String)">getRoleInfos</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><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 name of a given relation type.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#getRoleInfo(java.lang.String, java.lang.String)">getRoleInfo</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#removeRelationType(java.lang.String)">removeRelationType</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html#createRelation(java.lang.String, java.lang.String, javax.management.relation.RoleList)">createRelation</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/RelationServiceMBean.html" title="interface in javax.management.relation">RelationServiceMBean</A></CODE></DL></DD><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 parameter, except the role lis which can be null if no role initialization<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="addRelati
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -