The default constructor which constructs aModelMBeanInfowith empty component arrays and a default MBean descriptor.
ModelMBeanInfo (with ModelMBeanInfo)
Constructs aModelMBeanInfowhich is a duplicate of the one passed in.
ModelMBeanInfo (with className, description,
ModelMBeanAttributeInfo[], ModelMBeanConstructorInfo[],
ModelMBeanOperationInfo[], ModelMBeanNotificationInfo[])
Creates aModelMBeanInfowith the provided information, but the MBean descriptor is a default. The MBean descriptor must not be null. The default descriptor should at least contain thenameanddescriptorType fields. The name should match the MBean name.ModelMBeanInfo (with className, description,
ModelMBeanAttributeInfo[], ModelMBeanConstructorInfo[],
ModelMBeanOperationInfo[], ModelMBeanNotificationInfo[],
MBeanDescriptor)
Creates aModelMBeanInfowith the provided information. The MBean
descriptor is verified: if it is not valid, an exception will be thrown and a default MBean descriptor will be set.
■ It must implement the following model MBean-specific methods:
getMBeanDescriptor
Returns the MBean descriptor. This descriptor contains default configuration and policies that apply to the whole MBean and to its components by default. The descriptorTypefield will be “MBean”.
setMBeanDescriptor
Sets the MBean descriptor. This descriptor contains MBean-wide default
configuration and policies. This is a full replacement, no merging of fields is done. The descriptor is verified before it is set: if it is not valid, the change will not occur.
getDescriptor(s)
Returns a descriptor from a model MBean metadata object by name and descriptor type (as found in thedescriptorTypefield on the descriptor).
setDescriptor(s)
Sets a descriptor in the model MBean in a model MBean metadata object by name and descriptor type (found in thedescriptorTypefield on the descriptor). Replaces the descriptor in its entirety.
getAttribute
Returns aModelMBeanAttributeInfoby name.
getOperation
Returns aModelMBeanOperationInfoby name.
getNotification
Returns aModelMBeanNotificationInfoby name.
■ It must implement the following methods specified in theModelMBeanInfo interface but identical to those of theMBeanInfoclass (see “MBeanInfoClass” on page 54):
getAttributes
Returns an array of allModelMBeanAttributeInfoobjects.
getNotifications
Returns an array of allModelMBeanNotificationInfoobjects.
getOperations
Returns an array of allModeMBeanOperationInfoobjects.
getConstructors
getClassName
Returns the name of the managed resource class.
getDescription
Returns the description of this model MBean instance.
ModelMBeanAttributeInfo
Implementation
TheModelMBeanAttributeInfomust extend theMBeanAttributeInfoclass and implement theDescriptorAccessinterface. TheDescriptorAccess interface associates aDescriptorinstance with the existing metadata of the MBeanAttributeInfoclass.This descriptor must have anamefield which matches the name given by the getNamemethod of the corresponding metadata object. It must have a
descriptorTypewith the value “attribute”. It may also contain the following defined fields:value,default,displayName,getMethod,setMethod,
protocolMap,persistPolicy,persistPeriod,currencyTimeLimit, lastUpdatedTimeStamp,iterable,visibility, andpresentationString. See “Attribute Descriptor Fields” on page 95 for a detailed description of each of these fields.
TheModelMBeanAttributeInfoclass must have the following constructors:
■ A constructor accepting a name, description, getterMethod, and setterMethod which sets the descriptor to a default value with at least thenameand
descriptorTypefields set.
■ A constructor accepting a name, description, getterMethod, setterMethod, and a
Descriptorinstance which has at least itsnameanddescriptorTypefields set.
■ A constructor accepting a name, type, description,isReadable,isWritable, andisIsboolean parameters which sets the descriptor to a default value with at least thenameanddescriptorTypefields set.
■ A constructor accepting a name, description,isReadable,isWritable, and
isIsboolean parameters, and aDescriptorinstance which has at least its nameanddescriptorTypefields set.
ModelMBeanConstructorInfo
Implementation
TheModelMBeanConstructorInfomust extend theMBeanConstructorInfo class and implement theDescriptorAccessinterface. TheDescriptorAccess interface associates aDescriptorinstance with the existing metadata of the MBeanConstructorInfoclass.This descriptor must have anamefield which matches the name given by the getNamemethod of the corresponding metadata object. It must have a
descriptorTypewith the value “operation” and aroleof “constructor”. It may also contain the following defined fields:displayName,class,visibility, andpresentationString. See “Operation Descriptor Fields” on page 97 for a detailed description of each of these fields.
TheModelMBeanConstructorInfoclass must have the following constructors:
■ A constructor accepting a description andConstructorobject which sets the descriptor to a default value with at leastnameanddescriptorTypefields set.
■ A constructor accepting a description, aConstructorobject, and aDescriptor instance which has at least thenameanddescriptorTypefields set.
■ A constructor accepting a name, a description, and anMBeanParameterInfo array which sets the descriptor to a default value with at least thenameand descriptorTypefields set.
■ A constructor accepting a name, description,MBeanParameterInfoarray, and a Descriptorinstance which has at least itsnameanddescriptorTypefields set.
■ A copy constructor accepting aModelMBeanConstructorInfoobject.
ModelMBeanOperationInfo
Implementation
TheModelMBeanOperationInfomust extend theMBeanOperationInfoclass and implement theDescriptorAccessinterface. TheDescriptorAccess interface associates aDescriptorinstance with the existing metadata of the MBeanOperationInfoclass.This descriptor must have anamefield which matches the name given by the getNamemethod of the corresponding metadata object. It must have a
descriptorTypewith the value “operation” and aroleof “operation”, “getter”, or “setter”. It may also contain the following defined fields: displayName,class,targetObject,targetType,lastReturnedValue, currencyTimeLimit,lastReturnedTimeStamp,visibility, and
presentationString. See “Operation Descriptor Fields” on page 97 for a detailed description of each of these fields.
■ A constructor accepting a description and aMethodobject which sets the descriptor to a default value with at least itsnameanddescriptorTypefields set.
■ A constructor accepting a description, aMethodobject, and aDescriptor instance which at has least itsnameanddescriptorTypefields set.
■ A constructor accepting a name, description,MBeanParameterInfoarray, type, and an impact which sets the descriptor to a default value with at least thename anddescriptorTypefields set.
■ A constructor accepting a name, description,MBeanParameterInfoarray, type, impact and aDescriptorinstance which has at least itsnameand
descriptorTypefields set.
■ A copy constructor accepting aModelMBeanOperationInfoobject.
ModelMBeanNotificationInfo
Implementation
TheModelMBeanNotificationInfomust extend theMBeanNotificationInfo class and implement theDescriptorAccessinterface. TheDescriptorAccess interface associates aDescriptorinstance with the existing metadata of the MBeanNotificationInfoclass.This descriptor must have anamefield which matches the name given by the getNamemethod of the corresponding metadata object. It must have a descriptorTypewith the value “notification”. It may also contain the following defined fields:displayName,severity,messageID,log,logfile, visibility, and presentationString. See “Notification Descriptor Fields” on page 98 for a detailed description of each of these fields.
TheModelMBeanNotificationInfoclass must have the following constructors:
■ A constructor accepting an array of notification types, a name and a description
which sets the descriptor to a default value with at least itsnameand descriptorTypefields set.
■ A constructor accepting an array of notification types, a name, a description, and
aDescriptorinstance which has at least itsnameanddescriptorTypefields set.