📄 relationsupport.html
字号:
<DD><CODE><A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></CODE> - if the same name is used for two roles.<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 a required value (Relation Service Object Name, etc.) is not provided as parameter.</DL><HR><A NAME="RelationSupport(java.lang.String, javax.management.ObjectName, javax.management.MBeanServer, java.lang.String, javax.management.relation.RoleList)"><!-- --></A><H3>RelationSupport</H3><PRE>public <B>RelationSupport</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="../../../javax/management/ObjectName.html" title="class in javax.management">ObjectName</A> theRelServiceName, <A HREF="../../../javax/management/MBeanServer.html" title="interface in javax.management">MBeanServer</A> theRelServiceMBeanServer, <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/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</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></PRE><DL><DD>Creates object. <P>This constructor has to be used when the user relation MBean implements the interfaces expected to be supported by a relation by delegating to a RelationSupport object. <P>This object needs to know the Relation Service expected to handle the relation. So it has to know the MBean Server where the Relation Service is registered. <P>According to a limitation, a relation MBean must be registered in the same MBean Server as the Relation Service expected to handle it. So the user relation MBean has to be created and registered, and then the wrapped RelationSupport object can be created with identified MBean Server. <P>Nothing is done at the Relation Service level, i.e. the RelationSupport object is not added, and no check if the provided values are correct. The object is always created, EXCEPT if: <P>- one required parameter is not provided <P>- the same name is used for two roles. <P>To be handled as a relation, the object has then to be added in the Relation Service using the Relation Service method addRelation().<P><DT><B>Parameters:</B><DD><CODE>theRelId</CODE> - relation identifier, to identify the relation in the Relation Service. <P>Expected to be unique in the given Relation Service.<DD><CODE>theRelServiceName</CODE> - ObjectName of the Relation Service where the relation will be registered. <P>It is required as this is the Relation Service that is aware of the definition of the relation type of given relation, so that will be able to check update operations (set).<DD><CODE>theRelServiceMBeanServer</CODE> - MBean Server where the wrapping MBean is or will be registered. <P>Expected to be the MBean Server where the Relation Service is or will be registered.<DD><CODE>theRelTypeName</CODE> - Name of relation type. <P>Expected to have been created in given Relation Service.<DD><CODE>theRoleList</CODE> - list of roles (Role objects) to initialised the relation. Can be null. <P>Expected to conform to relation info in associated relation type.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/relation/InvalidRoleValueException.html" title="class in javax.management.relation">InvalidRoleValueException</A></CODE> - if the same name is used for two roles.<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 a required value (Relation Service Object Name, etc.) is not provided as parameter.</DL><!-- ============ 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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/Relation.html#getRole(java.lang.String)">getRole</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/Relation.html" title="interface in javax.management.relation">Relation</A></CODE></DL></DD><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/RelationSupport.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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/Relation.html#getRoles(java.lang.String[])">getRoles</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/Relation.html" title="interface in javax.management.relation">Relation</A></CODE></DL></DD><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/RelationSupport.html#setRoles(javax.management.relation.RoleList)"><CODE>setRoles(javax.management.relation.RoleList)</CODE></A></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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/Relation.html#getAllRoles()">getAllRoles</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/Relation.html" title="interface in javax.management.relation">Relation</A></CODE></DL></DD><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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/Relation.html#retrieveAllRoles()">retrieveAllRoles</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/Relation.html" title="interface in javax.management.relation">Relation</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a RoleList</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>Specified by:</B><DD><CODE><A HREF="../../../javax/management/relation/Relation.html#getRoleCardinality(java.lang.String)">getRoleCardinality</A></CODE> in interface <CODE><A HREF="../../../javax/management/relation/Relation.html" title="interface in javax.management.relation">Relation</A></CODE></DL></DD><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="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>,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -