📄 standardmbean.html
字号:
</TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="StandardMBean(java.lang.Object, java.lang.Class)"><!-- --></A><H3>StandardMBean</H3><PRE>public <B>StandardMBean</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> implementation, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> mbeanInterface) throws <A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></PRE><DL><DD><p>Make a DynamicMBean out of the object <var>implementation</var>, using the specified <var>mbeanInterface</var> class.</p><P><DT><B>Parameters:</B><DD><CODE>implementation</CODE> - The implementation of this MBean.<DD><CODE>mbeanInterface</CODE> - The Management Interface exported by this MBean's implementation. If <code>null</code>, then this object will use standard JMX design pattern to determine the management interface associated with the given implementation.<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 the given <var>implementation</var> is null.<DD><CODE><A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></CODE> - if the <var>mbeanInterface</var> does not follow JMX design patterns for Management Interfaces, or if the given <var>implementation</var> does not implement the specified interface.</DL><HR><A NAME="StandardMBean(java.lang.Class)"><!-- --></A><H3>StandardMBean</H3><PRE>protected <B>StandardMBean</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> mbeanInterface) throws <A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></PRE><DL><DD><p>Make a DynamicMBean out of <var>this</var>, using the specified <var>mbeanInterface</var> class.</p> <p>Call <A HREF="../../javax/management/StandardMBean.html#StandardMBean(java.lang.Object, java.lang.Class)"><CODE>this(this,mbeanInterface)</CODE></A>. This constructor is reserved to subclasses.</p><P><DT><B>Parameters:</B><DD><CODE>mbeanInterface</CODE> - The Management Interface exported by this MBean.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></CODE> - if the <var>mbeanInterface</var> does not follow JMX design patterns for Management Interfaces, or if <var>this</var> does not implement the specified interface.</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="setImplementation(java.lang.Object)"><!-- --></A><H3>setImplementation</H3><PRE>public void <B>setImplementation</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> implementation) throws <A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></PRE><DL><DD><p>Replace the implementation object wrapped in this object.</p><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>implementation</CODE> - The new implementation of this MBean. The <code>implementation</code> object must implement the MBean interface that was supplied when this <code>StandardMBean</code> was constructed.<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 the given <var>implementation</var> is null.<DD><CODE><A HREF="../../javax/management/NotCompliantMBeanException.html" title="class in javax.management">NotCompliantMBeanException</A></CODE> - if the given <var>implementation</var> does not implement the MBean interface that was supplied at construction.<DT><B>See Also:</B><DD><A HREF="../../javax/management/StandardMBean.html#getImplementation()"><CODE>getImplementation()</CODE></A></DL></DD></DL><HR><A NAME="getImplementation()"><!-- --></A><H3>getImplementation</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getImplementation</B>()</PRE><DL><DD>Get the implementation of this MBean.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The implementation of this MBean.<DT><B>See Also:</B><DD><A HREF="../../javax/management/StandardMBean.html#setImplementation(java.lang.Object)"><CODE>setImplementation(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getMBeanInterface()"><!-- --></A><H3>getMBeanInterface</H3><PRE>public final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> <B>getMBeanInterface</B>()</PRE><DL><DD>Get the Management Interface of this MBean.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The management interface of this MBean.</DL></DD></DL><HR><A NAME="getImplementationClass()"><!-- --></A><H3>getImplementationClass</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> <B>getImplementationClass</B>()</PRE><DL><DD>Get the class of the implementation of this MBean.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The class of the implementation of this MBean.</DL></DD></DL><HR><A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>getAttribute</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getAttribute</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> attribute) throws <A HREF="../../javax/management/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A>, <A HREF="../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A>, <A HREF="../../javax/management/ReflectionException.html" title="class in javax.management">ReflectionException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></B></DD><DD>Obtain the value of a specific attribute of the Dynamic MBean.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/DynamicMBean.html#getAttribute(java.lang.String)">getAttribute</A></CODE> in interface <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attribute</CODE> - The name of the attribute to be retrieved<DT><B>Returns:</B><DD>The value of the attribute retrieved.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/ReflectionException.html" title="class in javax.management">ReflectionException</A></CODE> - Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the getter.<DD><CODE><A HREF="../../javax/management/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A></CODE><DD><CODE><A HREF="../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's getter.<DT><B>See Also:</B><DD><A HREF="../../javax/management/DynamicMBean.html#setAttribute(javax.management.Attribute)"><CODE>DynamicMBean.setAttribute(javax.management.Attribute)</CODE></A></DL></DD></DL><HR><A NAME="setAttribute(javax.management.Attribute)"><!-- --></A><H3>setAttribute</H3><PRE>public void <B>setAttribute</B>(<A HREF="../../javax/management/Attribute.html" title="class in javax.management">Attribute</A> attribute) throws <A HREF="../../javax/management/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A>, <A HREF="../../javax/management/InvalidAttributeValueException.html" title="class in javax.management">InvalidAttributeValueException</A>, <A HREF="../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A>, <A HREF="../../javax/management/ReflectionException.html" title="class in javax.management">ReflectionException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></B></DD><DD>Set the value of a specific attribute of the Dynamic MBean.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/DynamicMBean.html#setAttribute(javax.management.Attribute)">setAttribute</A></CODE> in interface <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attribute</CODE> - The identification of the attribute to be set and the value it is to be set to.<DT><B>Throws:</B><DD><CODE><A HREF="../../javax/management/InvalidAttributeValueException.html" title="class in javax.management">InvalidAttributeValueException</A></CODE><DD><CODE><A HREF="../../javax/management/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A></CODE><DD><CODE><A HREF="../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps a <CODE>java.lang.Exception</CODE> thrown by the MBean's setter.<DD><CODE><A HREF="../../javax/management/ReflectionException.html" title="class in javax.management">ReflectionException</A></CODE> - Wraps a <CODE>java.lang.Exception</CODE> thrown while trying to invoke the MBean's setter.<DT><B>See Also:</B><DD><A HREF="../../javax/management/DynamicMBean.html#getAttribute(java.lang.String)"><CODE>DynamicMBean.getAttribute(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="getAttributes(java.lang.String[])"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../javax/management/AttributeList.html" title="class in javax.management">AttributeList</A> <B>getAttributes</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>[] attributes)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></B></DD><DD>Get the values of several attributes of the Dynamic MBean.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/DynamicMBean.html#getAttributes(java.lang.String[])">getAttributes</A></CODE> in interface <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - A list of the attributes to be retrieved.<DT><B>Returns:</B><DD>The list of attributes retrieved.<DT><B>See Also:</B><DD><A HREF="../../javax/management/DynamicMBean.html#setAttributes(javax.management.AttributeList)"><CODE>DynamicMBean.setAttributes(javax.management.AttributeList)</CODE></A></DL></DD></DL><HR><A NAME="setAttributes(javax.management.AttributeList)"><!-- --></A><H3>setAttributes</H3><PRE>public <A HREF="../../javax/management/AttributeList.html" title="class in javax.management">AttributeList</A> <B>setAttributes</B>(<A HREF="../../javax/management/AttributeList.html" title="class in javax.management">AttributeList</A> attributes)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></B></DD><DD>Sets the values of several attributes of the Dynamic MBean.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../javax/management/DynamicMBean.html#setAttributes(javax.management.AttributeList)">setAttributes</A></CODE> in interface <CODE><A HREF="../../javax/management/DynamicMBean.html" title="interface in javax.management">DynamicMBean</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attributes</CODE> - A list of attributes: The identification of the attributes to be set and the values they are to be set to.<DT><B>Returns:</B><DD>The list of attributes that were set, with their new values.<DT><B>See Also:</B><DD><A HREF="../../javax/management/DynamicMBean.html#getAttributes(java.lang.String[])"><CODE>DynamicMBean.getAttributes(java.lang.String[])</CODE></A></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -