Java Dynamic Management Kit 5.0 Tutorial


Attributes are conceptual variables that are exposed for management through getter and setter methods in the MBean interface:

Attribute types can be arrays of objects, but individual array elements cannot be accessed individually through the getters and setters. Use operations to access the array elements, as described in the next section. The following code example demonstrates an attribute with an array type:

public String[] getMessages();
public void setMessages(String[] msgArray);

The name of the attribute is the literal part of the method name following get, is, or set. This name is case sensitive in all Java Dynamic Management Kit (DMK) objects that manipulate attribute names. Using these patterns, we can determine the attributes exposed in Example 1–1:

The specification of the design patterns for attributes implies the following rules: