pp108 : InfoAttribute

InfoAttribute

This topic describes the info attribute for the managed components.

Defining InfoAttribute

Based upon the property of the class or the object, informational attribute is defined at the level of a managed component. The type of this attribute is read only and can be retrieved through JMX.

The following example defines an informational attribute with the argument PropertyDescriptor.

void defineInfoAttribute(java.lang.String name,
                         ILocalizableString description,
                         java.beans.PropertyDescriptor propertyDescr,
                         java.lang.Object sourceObject)

Parameters:

name: Refers to the name of the informational attribute.
description: Provides a description of the informational attribute (cannot be a null).
propertyDescr: Refers to the property that contains the value for the informational attribute.
sourceObject: Refers to the source object on which the getter method should be invoked. If the method is static, sourceObject refers to the class.

The following example defines informational attribute of Managed component with argument propertyName.

void defineInfoAttribute(java.lang.String name,
                         ILocalizableString description,
                         java.lang.String propertyName,
                         java.lang.Object sourceObject)

Parameters:
name: Refers to the name of the informational attribute.
description: Provides a description of the informational attribute (cannot be a null).
propertyName: Refers to the name of the property supplying the value for the informational attribute.
sourceObject: Refers to the source object on which the getter method should be invoked. If the method is static, sourceObject refers to the class.