com.j256.simplejmx.common
Annotation Type JmxAttributeField


@Retention(value=RUNTIME)
@Target(value=FIELD)
public @interface JmxAttributeField

This identifies which fields you want to expose via JMX via reflection. If the field is not public then it will try to open the accessibility on the field. Instead of annotating the fields, you can annotate your getXxx(), setXxx(), and isXxx() methods with JmxAttributeMethod.

 @JmxAttributeField(description = "Number of times our cache was hit")
 private int cacheHitCount;
 

Author:
graywatson

Optional Element Summary
 String description
          Description of the attribute for jconsole.
 boolean isReadible
          Set to false if the field should not be read through JMX.
 boolean isWritable
          Set to true if the field can be written by JMX.
 

description

public abstract String description
Description of the attribute for jconsole. Default is something like: "someField attribute".

Default:
""

isReadible

public abstract boolean isReadible
Set to false if the field should not be read through JMX. Default is true.

Default:
true

isWritable

public abstract boolean isWritable
Set to true if the field can be written by JMX. Default is false.

Default:
false


This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.