|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface JmxOperation
This identifies which methods are operations. It is added to methods that are _not_ named "get...", "set...", or "is...". The method can either return void or an object. It is recommended that the method return a simple object that will be for sure in jconsole's classpath. It also should not throw an unknown exception class. This class is similar to Spring's @ManagedOperation.
@JmxOperation(description = "Reset our max/min values", parameterNames = { "minValue", "maxValue" }, parameterDescriptions = { "low water mark", "high water mark" } public void resetMaxMin(int minValue, int maxValue) { ...
Optional Element Summary | |
---|---|
String |
description
Description of the attribute for jconsole. |
JmxOperationInfo.OperationAction |
operationAction
This optional is used by the JMX system to describe what sort of work is being done in this operation. |
String[] |
parameterDescriptions
Optional array of strings which describes each of the method parameters. |
String[] |
parameterNames
Optional array of strings which gives the name of each of the method parameters. |
public abstract String description
public abstract String[] parameterNames
parameterDescriptions()
array. Default is something like "p0". For example:
@JmxOperation(parameterNames = { "minValue", "maxValue" }, parameterDescriptions = { "low water mark", "high water mark" } public void resetMaxMin(int minValue, int maxValue) { ...
public abstract String[] parameterDescriptions
parameterNames()
array. If not specified then it will create one with the parameter number and type
-- something like "parameter #xf0 of type: int".
@JmxOperation(parameterNames = { "minValue", "maxValue" }, parameterDescriptions = { "low water mark", "high water mark" } public void resetMaxMin(int minValue, int maxValue) { ...
public abstract JmxOperationInfo.OperationAction operationAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |