MBean Getter Chains
Getter chains in custom MBean configuration specify the method that retrieves the value of interest.
Expressions can be executed against any value. In addition to getter chain support for numeric boxed primitives (Short, Integer, Long, and so on), Strings and Booleans are supported using implicit conversion.
Boolean and String are implicitly converted to an Integer:
- Booleans are automatically converted to 0 (false) and 1 (true).
- Strings are converted to numeric values.
This example illustrates how to use a getter chain, given the class with a getSomething()
method that returns the time:
In this example the metric getter chain configuration would be: