|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface JmxAttributeMethod
This identifies which getter and setter methods you want exposed via JMX . This is added to methods that are in the
form setXxx(), getXxx(), or isXxx() for the xxx field. The Xxx should
match precisely to line up the get and set JMX features. For example, if you are getting and setting the
fooBar field then it should be getFooBar() and setFooBar() .
isFooBar() is also allowed if foobar is a boolean or Boolean field. Instead of annotating the
methods, you can use the JmxAttributeField
to annotate the fields you want to expose.
Notice that although the field-name is fooBar with a lowercase 'f', the method name camel-cases it and turns it into getFooBar() with a capital 'F'. This class is similar to Spring's @ManagedAttribute. In addition, the "getXxx()" method must not return void and must have no arguments. The "setXxx()" method must return void and must take a single argument. isXxx() is allowed if it returns boolean or Boolean and the method has no arguments.
@JmxAttributeMethod(description = "Number of times our cache was hit") public int getCacheHitCount() {
Optional Element Summary | |
---|---|
String |
description
Description of the attribute for jconsole. |
public abstract String description
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |