📄 requiredmodelmbean.html
字号:
<LI> The ModelMBeanAttributeInfo isReadable method returns 'false'.</LI> </UL><DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps one of the following Exceptions: <UL> <LI> <A HREF="../../../javax/management/InvalidAttributeValueException.html" title="class in javax.management"><CODE>InvalidAttributeValueException</CODE></A>: A wrong value type was received from the attribute's getter method or no 'getMethod' field defined in the descriptor for the attribute and no default value exists.</LI> <LI> <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management"><CODE>ServiceNotFoundException</CODE></A>: No ModelMBeanOperationInfo defined for the attribute's getter method or no descriptor associated with the ModelMBeanOperationInfo 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> <LI> An Exception thrown by the managed object's getter.</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 getter.<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>: The attribute name in parameter is null.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/RequiredModelMBean.html#setAttribute(javax.management.Attribute)"><CODE>setAttribute(javax.management.Attribute)</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>[] attrNames)</PRE><DL><DD>Returns the values of several attributes in the ModelMBean. Executes a getAttribute for each attribute name in the attrNames array passed in.<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>attrNames</CODE> - A String array of names of the attributes to be retrieved.<DT><B>Returns:</B><DD>The array of the retrieved attributes.<DT><B>Throws:</B><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>: The object name in parameter is null or attributes in parameter is null.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/RequiredModelMBean.html#setAttributes(javax.management.AttributeList)"><CODE>setAttributes(javax.management.AttributeList)</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>Sets the value of a specific attribute of a named ModelMBean. If the 'setMethod' field of the attribute's descriptor contains the name of a valid operation descriptor, then the method described by the operation descriptor is executed. In this implementation, the operation descriptor must be specified correctly and assigned to the modelMBeanInfo so that the 'setMethod' works correctly. The response from the method is set as the value of the attribute in the descriptor. <p>If currencyTimeLimit is > 0, then the new value for the attribute is cached in the attribute descriptor's 'value' field and the 'lastUpdatedTimeStamp' field is set to the current time stamp. <p>If the persist field of the attribute's descriptor is not null then Persistance policy from the attribute descriptor is used to guide storing the attribute in a persistent store. <br>Store the MBean if 'persistPolicy' field is: <UL> <Li> != "never"</Li> <Li> = "always"</Li> <Li> = "onUpdate"</Li> <Li> = "onTimer" and now > 'lastPersistTime' + 'persistPeriod'</Li> <Li> = "NoMoreOftenThan" and now > 'lastPersistTime' + 'persistPeriod'</Li> </UL> Do not store the MBean if 'persistPolicy' field is: <UL> <Li> = "never"</Li> <Li> = "onTimer" && now < 'lastPersistTime' + 'persistPeriod'</Li> <Li> = "NoMoreOftenThan" and now < 'lastPersistTime' + 'persistPeriod'</Li> </UL> <p>The ModelMBeanInfo of the Model MBean is stored in a file.<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 Attribute instance containing the name 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/AttributeNotFoundException.html" title="class in javax.management">AttributeNotFoundException</A></CODE> - The specified attribute is not accessible in the MBean. <br>The following cases may result in an AttributeNotFoundException: <UL> <LI> No ModelMBeanAttributeInfo is found for the specified attribute.</LI> <LI> The ModelMBeanAttributeInfo's isWritable method returns 'false'.</LI> </UL><DD><CODE><A HREF="../../../javax/management/InvalidAttributeValueException.html" title="class in javax.management">InvalidAttributeValueException</A></CODE> - No descriptor is defined for the specified attribute.<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 setter.</LI> <LI> A <A HREF="../../../javax/management/ServiceNotFoundException.html" title="class in javax.management"><CODE>ServiceNotFoundException</CODE></A> if no `setMethod` field is defined in the descriptor for the attribute 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> <LI> An Exception thrown by the managed object's getter.</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 setter.<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>: The attribute in parameter is null.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/RequiredModelMBean.html#getAttribute(java.lang.String)"><CODE>getAttribute(java.lang.String)</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>Sets the values of an array of attributes of this ModelMBean. Executes the setAttribute() method for each attribute in the list.<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 array of attributes that were set, with their new values in Attribute instances.<DT><B>Throws:</B><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>: The object name in parameter is null or attributes in parameter is null.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/RequiredModelMBean.html#getAttributes(java.lang.String[])"><CODE>getAttributes(java.lang.String[])</CODE></A></DL></DD></DL><HR><A NAME="addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)"><!-- --></A><H3>addNotificationListener</H3><PRE>public void <B>addNotificationListener</B>(<A HREF="../../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener, <A HREF="../../../javax/management/NotificationFilter.html" title="interface in javax.management">NotificationFilter</A> filter, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> handback) 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></PRE><DL><DD>Registers an object which implements the NotificationListener interface as a listener. This object's 'handleNotification()' method will be invoked when any notification is issued through or by the ModelMBean. This does not include attributeChangeNotifications. They must be registered for independently.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/NotificationBroadcaster.html#addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)">addNotificationListener</A></CODE> in interface <CODE><A HREF="../../../javax/management/NotificationBroadcaster.html" title="interface in javax.management">NotificationBroadcaster</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener object which will handles notifications emitted by the registered MBean.<DD><CODE>filter</CODE> - The filter object. If null, no filtering will be performed before handling notifications.<DD><CODE>handback</CODE> - The context to be sent to the listener with the notification when a notification is emitted.<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> - The listener cannot be null.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/RequiredModelMBean.html#removeNotificationListener(javax.management.NotificationListener)"><CODE>removeNotificationListener(javax.management.NotificationListener)</CODE></A></DL></DD></DL><HR><A NAME="removeNotificationListener(javax.management.NotificationListener)"><!-- --></A><H3>removeNotificationListener</H3><PRE>public void <B>removeNotificationListener</B>(<A HREF="../../../javax/management/NotificationListener.html" title="interface in javax.management">NotificationListener</A> listener) throws <A HREF="../../../javax/management/ListenerNotFoundException.html" title="class in javax.man
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -