📄 relation.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/relation/Relation.html#handleMBeanUnregistration(javax.management.ObjectName, java.lang.String)">handleMBeanUnregistration</A></B>(<A HREF="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> theObjName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> theRoleName)</CODE><BR> Callback used by the Relation Service when a MBean referenced in a role is unregistered. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/management/relation/RoleList.html" title="class in javax.management.relation">RoleList</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/relation/Relation.html#retrieveAllRoles()">retrieveAllRoles</A></B>()</CODE><BR> Returns all roles in the relation without checking read mode.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/relation/Relation.html#setRole(javax.management.relation.Role)">setRole</A></B>(<A HREF="../../../javax/management/relation/Role.html" title="class in javax.management.relation">Role</A> theRole)</CODE><BR> Sets the given role. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/management/relation/RoleResult.html" title="class in javax.management.relation">RoleResult</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/relation/Relation.html#setRoles(javax.management.relation.RoleList)">setRoles</A></B>(<A HREF="../../../javax/management/relation/RoleList.html" title="class in javax.management.relation">RoleList</A> theRoleList)</CODE><BR> Sets the given roles. </TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getRole(java.lang.String)"><!-- --></A><H3>getRole</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>getRole</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> theRoleName) 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/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A>, <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A></PRE><DL><DD>Retrieves role value for given role name. <P>Checks if the role exists and is readable according to the relation type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRoleName</CODE> - name of role<DT><B>Returns:</B><DD>the ArrayList of ObjectName objects being the role value<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 role name<DD><CODE><A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></CODE> - if: <P>- there is no role with given name <P>- the role is not readable.<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<DT><B>See Also:</B><DD><A HREF="../../../javax/management/relation/Relation.html#setRole(javax.management.relation.Role)"><CODE>setRole(javax.management.relation.Role)</CODE></A></DL></DD></DL><HR><A NAME="getRoles(java.lang.String[])"><!-- --></A><H3>getRoles</H3><PRE>public <A HREF="../../../javax/management/relation/RoleResult.html" title="class in javax.management.relation">RoleResult</A> <B>getRoles</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>[] theRoleNameArray) 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></PRE><DL><DD>Retrieves values of roles with given names. <P>Checks for each role if it exists and is readable according to the relation type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRoleNameArray</CODE> - array of names of roles to be retrieved<DT><B>Returns:</B><DD>a RoleResult object, including a RoleList (for roles succcessfully retrieved) and a RoleUnresolvedList (for roles not retrieved).<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 role name<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<DT><B>See Also:</B><DD><A HREF="../../../javax/management/relation/Relation.html#setRoles(javax.management.relation.RoleList)"><CODE>setRoles(javax.management.relation.RoleList)</CODE></A></DL></DD></DL><HR><A NAME="getRoleCardinality(java.lang.String)"><!-- --></A><H3>getRoleCardinality</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> <B>getRoleCardinality</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> theRoleName) 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/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></PRE><DL><DD>Returns the number of MBeans currently referenced in the given role.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRoleName</CODE> - name of role<DT><B>Returns:</B><DD>the number of currently referenced MBeans in that role<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 role name<DD><CODE><A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></CODE> - if there is no role with given name</DL></DD></DL><HR><A NAME="getAllRoles()"><!-- --></A><H3>getAllRoles</H3><PRE>public <A HREF="../../../javax/management/relation/RoleResult.html" title="class in javax.management.relation">RoleResult</A> <B>getAllRoles</B>() throws <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A></PRE><DL><DD>Returns all roles present in the relation.<P><DD><DL><DT><B>Returns:</B><DD>a RoleResult object, including a RoleList (for roles succcessfully retrieved) and a RoleUnresolvedList (for roles not readable).<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</DL></DD></DL><HR><A NAME="retrieveAllRoles()"><!-- --></A><H3>retrieveAllRoles</H3><PRE>public <A HREF="../../../javax/management/relation/RoleList.html" title="class in javax.management.relation">RoleList</A> <B>retrieveAllRoles</B>()</PRE><DL><DD>Returns all roles in the relation without checking read mode.<P><DD><DL><DT><B>Returns:</B><DD>a RoleList.</DL></DD></DL><HR><A NAME="setRole(javax.management.relation.Role)"><!-- --></A><H3>setRole</H3><PRE>public void <B>setRole</B>(<A HREF="../../../javax/management/relation/Role.html" title="class in javax.management.relation">Role</A> theRole) 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/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</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>, <A HREF="../../../javax/management/relation/RelationServiceNotRegisteredException.html" title="class in javax.management.relation">RelationServiceNotRegisteredException</A>, <A HREF="../../../javax/management/relation/RelationNotFoundException.html" title="class in javax.management.relation">RelationNotFoundException</A></PRE><DL><DD>Sets the given role. <P>Will check the role according to its corresponding role definition provided in relation's relation type <P>Will send a notification (RelationNotification with type RELATION_BASIC_UPDATE or RELATION_MBEAN_UPDATE, depending if the relation is a MBean or not).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>theRole</CODE> - role to be set (name and new value)<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 role<DD><CODE><A HREF="../../../javax/management/relation/RoleNotFoundException.html" title="class in javax.management.relation">RoleNotFoundException</A></CODE> - if the role is not writable (no test on the write access mode performed when initialising the role)<DD><CODE><A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></CODE> - if value provided for role is not valid, i.e.: <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>- a MBean provided for that role does not exist.<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="../../../javax/management/relation/RelationTypeNotFoundException.html" title="class in javax.management.relation">RelationTypeNotFoundException</A></CODE> - if the relation type has not been declared in the Relation Service.<DD><CODE><A HREF="../../../javax/management/relation/RelationNotFoundException.html" title="class in javax.management.relation">RelationNotFoundException</A></CODE> - if the relation has not been
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -