Java Reference
In-Depth Information
attributes to set up a log file tracking all the notifications emitted by an MBean.
Doing so is useful because it lets you record the notification activity of your
MBeans for later retrieval and analysis.
As we cover each of the metadata objects, we will focus on their descriptors.
In their descriptors, you will see some of these attributes reproduced. If so, their
values take precedence over the value at the MBean level, but apply only to the
particular portion of the management interface being described.
7.4.3
The ModelMBeanAttributeInfo class
As you will recall, the MBeanInfo class (and therefore the ModelMBeanInfoSupport
class) can expose many attributes for management using the MBeanAttributeInfo
class. In the case of a Model MBean, the ModelMBeanAttributeInfo class is used.
Again, in this section, we will focus on the Descriptor object that this class con-
tains. Table 7.3 lists the predefined values of its descriptor.
Table 7.3
Attribute-level descriptor attributes
Descriptor attribute
Possible values
Description
User-defined
Attribute name
name
mbean , attribute , opera-
tion , notification
Type of descriptor
descriptorType
Value of the attribute
Current value of the attribute
value
User-defined
Default value of the attribute
default
Method name of the getter for
this attribute
Name of the method used to get the
value of this attribute
getMethod
Method name of the setter for
this attribute
Name of the method used to set the
value of this attribute
setMethod
Object that provides a mapping to a
different protocol
prototcolMap
Update , OnTimer , NoMore-
OftenThan , Always , Never
How often to persist this attribute
persistPolicy
Seconds
Same as the MBean level
persistPeriod
< 0 = never; 0 = always,
> 0 = a seconds value
How long an attribute value is valid
before needing to be refreshed
currencyTimeLimit
long value
When the value was last updated
lastUpdatedTimeStamp
T , F
Whether the attribute value object
implements the Iterable interface
iterable
1 to 4
Same as the MBean level
visibility
Search WWH ::




Custom Search