|
Java example source code file (ModelMBeanAttributeInfo.java)
The ModelMBeanAttributeInfo.java Java example source code/* * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @author IBM Corp. * * Copyright IBM Corp. 1999-2000. All rights reserved. */ package javax.management.modelmbean; import static com.sun.jmx.defaults.JmxProperties.MODELMBEAN_LOGGER; import com.sun.jmx.mbeanserver.GetPropertyAction; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamField; import java.lang.reflect.Method; import java.security.AccessController; import java.util.logging.Level; import javax.management.Descriptor; import javax.management.DescriptorKey; import javax.management.DescriptorAccess; import javax.management.MBeanAttributeInfo; import javax.management.RuntimeOperationsException; /** * <p>The ModelMBeanAttributeInfo object describes an attribute of the ModelMBean. * It is a subclass of MBeanAttributeInfo with the addition of an associated Descriptor * and an implementation of the DescriptorAccess interface.</p> * * <P id="descriptor"> * The fields in the descriptor are defined, but not limited to, the following. * Note that when the Type in this table is Number, a String that is the decimal * representation of a Long can also be used.</P> * * <table border="1" cellpadding="5" summary="ModelMBeanAttributeInfo Fields"> * <tr> | name | String | * <td>Attribute name. * <tr>descriptorType | String | * <td>Must be "attribute". * <tr id="value-field">value | Object | * <td>Current (cached) value for attribute. * <tr>default | Object | * <td>Default value for attribute. * <tr>displayName | String | * <td>Name of attribute to be used in displays. * <tr>getMethod | String | * <td>Name of operation descriptor for get method. * <tr>setMethod | String | * <td>Name of operation descriptor for set method. * <tr>protocolMap | Descriptor | * <td>See the section "Protocol Map Support" in the JMX specification * document. Mappings must be appropriate for the attribute and entries * can be updated or augmented at runtime.</td> * <tr>persistPolicy | String | * <td>One of: OnUpdate|OnTimer|NoMoreOftenThan|OnUnregister|Always|Never. * See the section "MBean Descriptor Fields" in the JMX specification * document.</td> * <tr>persistPeriod | Number | * <td>Frequency of persist cycle in seconds. Used when persistPolicy is * "OnTimer" or "NoMoreOftenThan".</td> * <tr>currencyTimeLimit | Number | * <td>How long value is valid: <0 never, * =0 always, >0 seconds.</td> * <tr>lastUpdatedTimeStamp | Number | * <td>When value was set. * <tr>visibility | Number | * <td>1-4 where 1: always visible, 4: rarely visible. * <tr>presentationString | String | * <td>XML formatted string to allow presentation of data. * </table> * * <p>The default descriptor contains the name, descriptorType and displayName * fields. The default value of the name and displayName fields is the name of * the attribute.</p> * * <p>Note: because of inconsistencies in previous versions of * this specification, it is recommended not to use negative or zero * values for <code>currencyTimeLimit. To indicate that a * cached value is never valid, omit the * <code>currencyTimeLimit field. To indicate that it is * always valid, use a very large number for this field.</p> * * <p>The serialVersionUID of this class is
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.