站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

ModelMBeanAttributeInfo (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management.modelmbean
Class ModelMBeanAttributeInfo

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

public class ModelMBeanAttributeInfo
extends MBeanAttributeInfo
implements DescriptorAccess, Cloneable

Represents a Model MBean's management attribute.

Version:
$Revision: 1.13 $

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
Author:
Juha Lindfors., Adrian Brock., Thomas Diesler.
See Also:
MBeanAttributeInfo, Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanFeatureInfo
description, name
 
Constructor Summary
ModelMBeanAttributeInfo(ModelMBeanAttributeInfo info)
          Copy constructor.
ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter)
          Creates a new attribute info with a default descriptor.
ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter, Descriptor descriptor)
          Creates a new attribute info object.
ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs)
          Creates a new attribute info object with a default descriptor.
ModelMBeanAttributeInfo(String name, String type, String description, boolean isReadable, boolean isWritable, boolean isIs, Descriptor descriptor)
          Creates a new attribute info object with a given descriptor.
 
Method Summary
 Object clone()
          Creates a copy of this object.
 Descriptor getDescriptor()
          Returns a copy of the descriptor associated with this attribute.
 void setDescriptor(Descriptor inDescriptor)
          Replaces the descriptor associated with this attribute.
 String toString()
          Returns a string representation of this Model MBean attribute info object.
 
Methods inherited from class javax.management.MBeanAttributeInfo
equals, getType, hashCode, isIs, isReadable, isWritable
 
Methods inherited from class javax.management.MBeanFeatureInfo
getDescription, getName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelMBeanAttributeInfo

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

Parameters:
name - name of the attribute
description - human readable description string
getter - a Method instance representing a read method for this attribute
setter - a Method instance representing a write method for this attribute
Throws:
IntrospectionException - if the accessor methods are not valid for this attribute

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(String name,
                               String description,
                               Method getter,
                               Method setter,
                               Descriptor descriptor)
                        throws 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.

Parameters:
name - name of the attribute
description - human readable description string
getter - a Method instance representing a read method for this attribute
setter - a Method instance representing a write method for this attribute
descriptor - a descriptor to associate with this attribute
Throws:
IntrospectionException - if the accessor methods are not valid for this attribute

ModelMBeanAttributeInfo

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

Parameters:
name - name of the attribute
type - fully qualified class name of the attribute's type
description - human readable description string
isReadable - true if attribute is readable; false otherwise
isWritable - true if attribute is writable; false otherwise
isIs - (not used for Model MBeans; false)

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(String name,
                               String type,
                               String description,
                               boolean isReadable,
                               boolean isWritable,
                               boolean isIs,
                               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.

Parameters:
name - name of the attribute
type - fully qualified class name of the attribute's type
description - human readable description string
isReadable - true if the attribute is readable; false otherwise
isWritable - true if the attribute is writable; false otherwise
isIs - (not used for Model MBeans; false)

ModelMBeanAttributeInfo

public ModelMBeanAttributeInfo(ModelMBeanAttributeInfo info)
Copy constructor.

Parameters:
info - the attribute info to copy
Method Detail

getDescriptor

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

Specified by:
getDescriptor in interface DescriptorAccess
Returns:
a copy of this attribute's descriptor

setDescriptor

public void setDescriptor(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 DescriptorAccess
Parameters:
inDescriptor - descriptor used for replacing the existing operation descriptor
Throws:
IllegalArgumentException - if the new descriptor is not valid

clone

public Object clone()
Creates a copy of this object.

Overrides:
clone in class MBeanAttributeInfo
Returns:
clone of this object

toString

public 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>)]

 

Overrides:
toString in class MBeanAttributeInfo
Returns:
string representation of this object


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.