Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.management.modelmbean
Class ModelMBeanAttributeInfo  view ModelMBeanAttributeInfo download ModelMBeanAttributeInfo.java

java.lang.Object
  extended byjavax.management.MBeanFeatureInfo
      extended byjavax.management.MBeanAttributeInfo
          extended byjavax.management.modelmbean.ModelMBeanAttributeInfo
All Implemented Interfaces:
java.lang.Cloneable, javax.management.DescriptorAccess, java.io.Serializable

public class ModelMBeanAttributeInfo
extends javax.management.MBeanAttributeInfo
implements javax.management.DescriptorAccess, java.lang.Cloneable

Represents a Model MBean's management attribute.

Version:
$Revision: 1.6.4.2 $

Revisions:

20020320 Juha Lindfors:

  • toString() implementation
  • Changed the default descriptor to include field currencyTimeLimit with a value -1. Since default descriptors do not include method mapping this automatically caches attribute values in the Model MBean.

20020715 Adrian Brock:

  • Serialization

Field Summary
private  javax.management.Descriptor descriptor
          The descriptor associated with this attribute.
private static org.jboss.logging.Logger log
           
private static java.io.ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
 
Fields inherited from class javax.management.MBeanAttributeInfo
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
ModelMBeanAttributeInfo(ModelMBeanAttributeInfo info)
          Copy constructor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String description, java.lang.reflect.Method getter, java.lang.reflect.Method setter)
          Creates a new attribute info with a default descriptor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String description, java.lang.reflect.Method getter, java.lang.reflect.Method setter, javax.management.Descriptor descriptor)
          Creates a new attribute info object.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String type, java.lang.String description, boolean isReadable, boolean isWritable, boolean isIs)
          Creates a new attribute info object with a default descriptor.
ModelMBeanAttributeInfo(java.lang.String name, java.lang.String type, java.lang.String description, boolean isReadable, boolean isWritable, boolean isIs, javax.management.Descriptor descriptor)
          Creates a new attribute info object with a given descriptor.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this object.
private  javax.management.Descriptor createDefaultDescriptor()
          Creates a default descriptor with "name" field set to this attributes name, "descriptorType" field set to "attribute" and "currencyTimeLimit" set to -1 (always cache attributes).
 javax.management.Descriptor getDescriptor()
          Returns a copy of the descriptor associated with this attribute.
private  void readObject(java.io.ObjectInputStream ois)
           
 void setDescriptor(javax.management.Descriptor inDescriptor)
          Replaces the descriptor associated with this attribute.
 java.lang.String toString()
          Returns a string representation of this Model MBean attribute info object.
private  void writeObject(java.io.ObjectOutputStream oos)
           
 
Methods inherited from class javax.management.MBeanAttributeInfo
getType, isIs, isReadable, isWritable
 
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

descriptor

private javax.management.Descriptor descriptor
The descriptor associated with this attribute.


log

private static final org.jboss.logging.Logger log

serialVersionUID

private static final long serialVersionUID

serialPersistentFields

private static final java.io.ObjectStreamField[] serialPersistentFields
Constructor Detail

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String description,
                               java.lang.reflect.Method getter,
                               java.lang.reflect.Method setter)
                        throws javax.management.IntrospectionException
Creates a new attribute info with a default descriptor.


ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String description,
                               java.lang.reflect.Method getter,
                               java.lang.reflect.Method setter,
                               javax.management.Descriptor descriptor)
                        throws javax.management.IntrospectionException
Creates a new attribute info object. If a null or invalid descriptor is passed as a parameter, a default descriptor will be created for the attribute.


ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String type,
                               java.lang.String description,
                               boolean isReadable,
                               boolean isWritable,
                               boolean isIs)
Creates a new attribute info object with a default descriptor.


ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(java.lang.String name,
                               java.lang.String type,
                               java.lang.String description,
                               boolean isReadable,
                               boolean isWritable,
                               boolean isIs,
                               javax.management.Descriptor descriptor)
Creates a new attribute info object with a given descriptor. If a null or invalid descriptor is passed as a parameter, a default descriptor will be created for the attribute.


ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(ModelMBeanAttributeInfo info)
Copy constructor.

Method Detail

getDescriptor

public javax.management.Descriptor getDescriptor()
Returns a copy of the descriptor associated with this attribute.

Specified by:
getDescriptor in interface javax.management.DescriptorAccess

setDescriptor

public void setDescriptor(javax.management.Descriptor inDescriptor)
Replaces the descriptor associated with this attribute. If the inDescriptor argument is null then the existing descriptor is replaced with a default descriptor.

Specified by:
setDescriptor in interface javax.management.DescriptorAccess

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a copy of this object.


toString

public java.lang.String toString()
Returns a string representation of this Model MBean attribute info object. The returned string is in the form:

   ModelMBeanAttributeInfo[Name=<attribute name>,
   Type=<class name of the attribute type>,
   Access= RW | RO | WO,
   Descriptor=(fieldName1=fieldValue1, ... , fieldName<n>=fieldValue<n>)]

 


createDefaultDescriptor

private javax.management.Descriptor createDefaultDescriptor()
Creates a default descriptor with "name" field set to this attributes name, "descriptorType" field set to "attribute" and "currencyTimeLimit" set to -1 (always cache attributes).


readObject

private void readObject(java.io.ObjectInputStream ois)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream oos)
                  throws java.io.IOException