📄 requiredmodelmbean.html
字号:
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps another exception or persistence is not supported<DD><CODE><A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></CODE> - Could not find or load this MBean from persistent storage<DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - Wraps exceptions from the persistence mechanism</DL></DD></DL><HR><A NAME="store()"><!-- --></A><H3>store</H3><PRE>public void <B>store</B>() throws <A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A>, <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A>, <A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></PRE><DL><DD>Persistence is not supported by the this Model MBean implementation. An MBeanException wrapping a <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management"><CODE>ServiceNotFoundException</CODE></A> is thrown.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/PersistentMBean.html#store()">store</A></CODE> in interface <CODE><A HREF="../../../javax/management/PersistentMBean.html" title="interface in javax.management">PersistentMBean</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/InstanceNotFoundException.html" title="class in javax.management">InstanceNotFoundException</A></CODE> - Could not find/access the persistant store<DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps another exception or persistence is not supported<DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - Wraps exceptions from the persistence mechanism</DL></DD></DL><HR><A NAME="getMBeanInfo()"><!-- --></A><H3>getMBeanInfo</H3><PRE>public <A HREF="../../../javax/management/MBeanInfo.html" title="class in javax.management">MBeanInfo</A> <B>getMBeanInfo</B>()</PRE><DL><DD>Returns the attributes, operations, constructors and notifications that this RequiredModelMBean exposes for management.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/DynamicMBean.html#getMBeanInfo()">getMBeanInfo</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>Returns:</B><DD>An instance of ModelMBeanInfo allowing retrieval all attributes, operations, and Notifications of this MBean.</DL></DD></DL><HR><A NAME="invoke(java.lang.String, java.lang.Object[], java.lang.String[])"><!-- --></A><H3>invoke</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>invoke</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> opName, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] opArgs, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] sig) throws <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>Invokes a method on or through a RequiredModelMBean and returns the result of the method execution. <P> If the given method to be invoked, together with the provided signature, matches one of RequiredModelMbean accessible methods, this one will be call. Otherwise the call to the given method will be tried on the managed ressource. <P> The last value returned by an operation may be cached in the operation's descriptor which is in the ModelMBeanOperationInfo's descriptor. The valid value will be in the 'value' field if there is one. If the 'currencyTimeLimit' field in the descriptor is: <UL> <LI><b><0</b> Then the value is not cached and is never valid. The operation method is invoked. The 'value' and 'lastUpdatedTimeStamp' fields are cleared.</LI> <LI><b>=0</b> Then the value is always cached and always valid. The 'value' field is returned. If there is no 'value' field then the operation method is invoked for the attribute. The 'lastUpdatedTimeStamp' field and `value' fields are set to the operation's return value and the current time stamp.</LI> <LI><b>>0</b> Represents the number of seconds that the 'value' field is valid. The 'value' field is no longer valid when 'lastUpdatedTimeStamp' + 'currencyTimeLimit' > Now. <UL> <LI>When 'value' is valid, 'value' is returned.</LI> <LI>When 'value' is no longer valid then the operation method is invoked. The 'lastUpdatedTimeStamp' field and `value' fields are updated.</lI> </UL> </LI> </UL><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/DynamicMBean.html#invoke(java.lang.String, java.lang.Object[], java.lang.String[])">invoke</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>opName</CODE> - The name of the method to be invoked. The name can be the fully qualified method name including the classname, or just the method name if the classname is defined in the 'class' field of the operation descriptor.<DD><CODE>opArgs</CODE> - An array containing the parameters to be set when the operation is invoked<DD><CODE>sig</CODE> - An array containing the signature of the operation. The class objects will be loaded using the same class loader as the one used for loading the MBean on which the operation was invoked.<DT><B>Returns:</B><DD>The object returned by the method, which represents the result of invoking the method on the specified managed resource.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps one of the following Exceptions: <UL> <LI> An Exception thrown by the managed object's invoked method.</LI> <LI> <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management"><CODE>ServiceNotFoundException</CODE></A>: No ModelMBeanOperationInfo or no descriptor defined for the specified operation or the managed resource is null.</LI> <LI> <A HREF="../../../javax/management/modelmbean/InvalidTargetObjectTypeException.html" title="class in javax.management.modelmbean"><CODE>InvalidTargetObjectTypeException</CODE></A>: The 'targetType' field value is not 'objectReference'.</LI> </UL><DD><CODE><A HREF="../../../javax/management/ReflectionException.html" title="class in javax.management">ReflectionException</A></CODE> - Wraps an <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Exception.html" title="class or interface in java.lang"><CODE>Exception</CODE></A> thrown while trying to invoke the method.<DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - Wraps an <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang"><CODE>IllegalArgumentException</CODE></A> Method name is null.</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> attrName) 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>Returns the value of a specific attribute defined for this ModelMBean. The last value returned by an attribute may be cached in the attribute's descriptor. The valid value will be in the 'value' field if there is one. If the 'currencyTimeLimit' field in the descriptor is: <UL> <LI> <b><0</b> Then the value is not cached and is never valid. The getter method is invoked for the attribute. The 'value' and 'lastUpdatedTimeStamp' fields are cleared.</LI> <LI> <b>=0</b> Then the value is always cached and always valid. The 'value' field is returned. If there is no'value' field then the getter method is invoked for the attribute. The 'lastUpdatedTimeStamp' field and `value' fields are set to the attribute's value and the current time stamp.</LI> <LI> <b>>0</b> Represents the number of seconds that the 'value' field is valid. The 'value' field is no longer valid when 'lastUpdatedTimeStamp' + 'currencyTimeLimit' > Now. <UL> <LI>When 'value' is valid, 'value' is returned.</LI> <LI>When 'value' is no longer valid then the getter method is invoked for the attribute. The 'lastUpdatedTimeStamp' field and `value' fields are updated.</LI> </UL></LI> </UL> If the 'getMethod' field contains the name of a valid operation descriptor, then the method described by the operation descriptor is executed. The response from the method is returned as the value of the attribute. If the operation fails or the returned value is not of the same type as the attribute, an exception will be thrown. If no 'getMethod' field is defined then the default value of the attribute is returned. In this implementation, in every case where the getMethod needs to be called, because the method is invoked through the standard "invoke" method and thus needs operationInfo, an operation must be specified for that getMethod so that the invocation works correctly.<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>attrName</CODE> - A String specifying the name of the attribute to be retrieved. It must match the name of a ModelMBeanAttributeInfo.<DT><B>Returns:</B><DD>The value of the retrieved attribute from the descriptor 'value' field or from the invocation of the operation in the 'getMethod' field of the descriptor.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A></CODE> - The specified attribute is not accessible in the MBean. The following cases may result in an AttributeNotFoundException: <UL> <LI> No ModelMBeanInfo was found for the Model MBean.</LI> <LI> No ModelMBeanAttributeInfo was found for the specified attribute name.</LI>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -