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

ModelMBeanInfoSupport (JBoss/JMX API) - JBoss 3.2.7 jmx API Documentation 英文版文档


javax.management.modelmbean
Class ModelMBeanInfoSupport

java.lang.Object
  extended byjavax.management.MBeanInfo
      extended byjavax.management.modelmbean.ModelMBeanInfoSupport
All Implemented Interfaces:
Cloneable, ModelMBeanInfo, Serializable

public class ModelMBeanInfoSupport
extends MBeanInfo
implements ModelMBeanInfo, Serializable

Support class for ModelMBeanInfo interface.

Version:
$Revision: 1.9.4.2 $

Revisions:

20020319 Juha Lindfors:

  • Fixed ArrayIndexOutOfBoundsException bug in getOperationDescriptors()

20020525 Juha Lindfors:

  • Fixed the getDescriptor(name, type) exception behavior to match RI 1.0 javadoc: RuntimeOperationsException is thrown in case of a illegal descriptor type string.
  • setDescriptors() now implemented and no longer throws 'NYI' error.
  • clone() implemented

20020715 Adrian Brock:

  • Serialization
Author:
Juha Lindfors., Adrian Brock.
See Also:
ModelMBeanInfo, Serialized Form

Field Summary
 
Fields inherited from class javax.management.MBeanInfo
attributes, className, constructors, description, notifications, operations
 
Constructor Summary
ModelMBeanInfoSupport(ModelMBeanInfo mbi)
          Copy constructor for Model MBean info.
ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications)
          Creates an instance of Model MBean info implementation based on the given values.
ModelMBeanInfoSupport(String className, String description, ModelMBeanAttributeInfo[] attributes, ModelMBeanConstructorInfo[] constructors, ModelMBeanOperationInfo[] operations, ModelMBeanNotificationInfo[] notifications, Descriptor mbeandescriptor)
          Creates an instance of Model MBean info implementation based on the given values and descriptor.
 
Method Summary
 Object clone()
           
 ModelMBeanAttributeInfo getAttribute(String inName)
           
 MBeanAttributeInfo[] getAttributes()
           
 ModelMBeanConstructorInfo getConstructor(String inName)
           
 MBeanConstructorInfo[] getConstructors()
           
 Descriptor getDescriptor(String descrName)
          Deprecated. use getDescriptor(String, String) instead.
 Descriptor getDescriptor(String descrName, String descrType)
          Returns a descriptor of a management interface element matching the given name and type.
 Descriptor[] getDescriptors(String descrType)
          Returns the descriptors of an Model MBean for a given management interface element type.
 Descriptor getMBeanDescriptor()
           
 ModelMBeanNotificationInfo getNotification(String inName)
           
 MBeanNotificationInfo[] getNotifications()
           
 ModelMBeanOperationInfo getOperation(String inName)
           
 MBeanOperationInfo[] getOperations()
           
 void setDescriptor(Descriptor descr, String descrType)
          Adds or replaces the descriptor in this Model MBean.
 void setDescriptors(Descriptor[] inDescriptors)
          Adds or replaces the descriptors in this Model MBean.
 void setMBeanDescriptor(Descriptor inMBeanDescriptor)
           
 
Methods inherited from class javax.management.MBeanInfo
equals, getClassName, getDescription, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.management.modelmbean.ModelMBeanInfo
getClassName, getDescription
 

Constructor Detail

ModelMBeanInfoSupport

public ModelMBeanInfoSupport(ModelMBeanInfo mbi)
Copy constructor for Model MBean info. This instance is initialized with the values of the given Model MBean info.

Parameters:
mbi - Model MBean info used to initialize this instance

ModelMBeanInfoSupport

public ModelMBeanInfoSupport(String className,
                             String description,
                             ModelMBeanAttributeInfo[] attributes,
                             ModelMBeanConstructorInfo[] constructors,
                             ModelMBeanOperationInfo[] operations,
                             ModelMBeanNotificationInfo[] notifications)
Creates an instance of Model MBean info implementation based on the given values. The Model MBean is configured with a default MBean descriptor.

Parameters:
className - name of the Model MBean implementation class
description - human readable description string for this Model MBean
attributes - an array of Model MBean attribute metadata to describe the management attributes of this Model MBean
constructors - an array of Model MBean constructor metadata that describes the constructors of this Model MBean implementation class
operations - an array of Model MBean operation metadata to describe the management operations of this Model MBean
notifications - an array of Model MBean notification metadata to describe the management notifications of this Model MBean

ModelMBeanInfoSupport

public ModelMBeanInfoSupport(String className,
                             String description,
                             ModelMBeanAttributeInfo[] attributes,
                             ModelMBeanConstructorInfo[] constructors,
                             ModelMBeanOperationInfo[] operations,
                             ModelMBeanNotificationInfo[] notifications,
                             Descriptor mbeandescriptor)
Creates an instance of Model MBean info implementation based on the given values and descriptor.

Parameters:
className - name of the Model MBean implementation class
description - human readable description string for this Model MBean
attributes - an array of Model MBean attribute metadata to describe the management attributes of this Model MBean
constructors - an array of Model MBean constructor metadata that describes the constructors of this Model MBean implementation class
operations - an array of Model MBean operation metadata to describe the management operations of this Model MBean
notifications - an array of Model MBean notification metadata to describe the management notifications of this Model MBean
Method Detail

getDescriptors

public Descriptor[] getDescriptors(String descrType)
                            throws MBeanException
Returns the descriptors of an Model MBean for a given management interface element type. The descriptor type must be one of the following:

   - MBEAN_DESCRIPTOR
   - ATTRIBUTE_DESCRIPTOR
   - OPERATION_DESCRIPTOR
   - NOTIFICATION_DESCRIPTOR
   - CONSTRUCTOR_DESCRIPTOR
   - ALL_DESCRIPTORS

 
Using ALL_DESCRIPTORS returns descriptors for the MBean, and all its attributes, operations, notifications and constructors.

Specified by:
getDescriptors in interface ModelMBeanInfo
Parameters:
descrType - descriptor type string
Returns:
MBean descriptors.
Throws:
MBeanException - for no good reason

getDescriptor

public Descriptor getDescriptor(String descrName,
                                String descrType)
                         throws MBeanException
Returns a descriptor of a management interface element matching the given name and type. The descriptor type string must be one of the following:

   - MBEAN_DESCRIPTOR
   - ATTRIBUTE_DESCRIPTOR
   - OPERATION_DESCRIPTOR
   - NOTIFICATION_DESCRIPTOR
   - CONSTRUCTOR_DESCRIPTOR

 

Specified by:
getDescriptor in interface ModelMBeanInfo
Parameters:
descrName - name of the descriptor
descrType - type of the descriptor
Returns:
the requested descriptor or null if it was not found
Throws:
RuntimeOperationsException - if an illegal descriptor type was given
MBeanException

setDescriptors

public void setDescriptors(Descriptor[] inDescriptors)
                    throws MBeanException
Adds or replaces the descriptors in this Model MBean. All descriptors must be valid. Null references will be ignored.

Specified by:
setDescriptors in interface ModelMBeanInfo
Parameters:
inDescriptors - array of descriptors
Throws:
MBeanException

setDescriptor

public void setDescriptor(Descriptor descr,
                          String descrType)
                   throws MBeanException
Adds or replaces the descriptor in this Model MBean. Descriptor must be valid. If descrType is not specified, the descriptorType field of the given descriptor is used.

The descriptorType must contain one of the following values:


   - MBEAN_DESCRIPTOR
   - ATTRIBUTE_DESCRIPTOR
   - OPERATION_DESCRIPTOR
   - NOTIFICATION_DESCRIPTOR
   - CONSTRUCTOR_DESCRIPTOR

 

Specified by:
setDescriptor in interface ModelMBeanInfo
Parameters:
descr - descriptor to set
descrType - descriptor type string, can be null
Throws:
RuntimeOperationsException - if descr is null, or descriptor is not valid.
MBeanException

getAttribute

public ModelMBeanAttributeInfo getAttribute(String inName)
                                     throws MBeanException
Specified by:
getAttribute in interface ModelMBeanInfo
Throws:
MBeanException

getOperation

public ModelMBeanOperationInfo getOperation(String inName)
                                     throws MBeanException
Specified by:
getOperation in interface ModelMBeanInfo
Throws:
MBeanException

getConstructor

public ModelMBeanConstructorInfo getConstructor(String inName)
                                         throws MBeanException
Throws:
MBeanException

getNotification

public ModelMBeanNotificationInfo getNotification(String inName)
                                           throws MBeanException
Specified by:
getNotification in interface ModelMBeanInfo
Throws:
MBeanException

getAttributes

public MBeanAttributeInfo[] getAttributes()
Specified by:
getAttributes in interface ModelMBeanInfo
Overrides:
getAttributes in class MBeanInfo

getOperations

public MBeanOperationInfo[] getOperations()
Specified by:
getOperations in interface ModelMBeanInfo
Overrides:
getOperations in class MBeanInfo

getConstructors

public MBeanConstructorInfo[] getConstructors()
Specified by:
getConstructors in interface ModelMBeanInfo
Overrides:
getConstructors in class MBeanInfo

getNotifications

public MBeanNotificationInfo[] getNotifications()
Specified by:
getNotifications in interface ModelMBeanInfo
Overrides:
getNotifications in class MBeanInfo

getMBeanDescriptor

public Descriptor getMBeanDescriptor()
                              throws MBeanException
Specified by:
getMBeanDescriptor in interface ModelMBeanInfo
Throws:
MBeanException

setMBeanDescriptor

public void setMBeanDescriptor(Descriptor inMBeanDescriptor)
                        throws MBeanException
Specified by:
setMBeanDescriptor in interface ModelMBeanInfo
Throws:
MBeanException

getDescriptor

public Descriptor getDescriptor(String descrName)
                         throws MBeanException
Deprecated. use getDescriptor(String, String) instead.

Throws:
MBeanException

clone

public Object clone()
Specified by:
clone in interface ModelMBeanInfo
Overrides:
clone in class MBeanInfo


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