[Bug 401027] javadoc JMX annotations

This commit is contained in:
Jesse McConnell 2013-05-31 14:37:02 -05:00
parent c708d9ce7c
commit a2732e3cf6
4 changed files with 40 additions and 0 deletions

View File

@ -36,6 +36,16 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The @ManagedAttribute annotation is used to indicate that a given method
* exposes a JMX attribute. This annotation is placed always on the reader
* method of a given attribute. Unless it is marked as read-only in the
* configuration of the annotation a corresponding setter is looked for
* following normal naming conventions. For example if this annotation is
* on a method called getFoo() then a method called setFoo() would be looked
* for and if found wired automatically into the jmx attribute.
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target( { ElementType.METHOD } )

View File

@ -24,6 +24,14 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The @ManagedObject annotation is used on a class at the top level to
* indicate that it should be exposed as an mbean. It has only one attribute
* to it which is used as the description of the MBean. Should multiple
* @ManagedObject annotations be found in the chain of influence then the
* first description is used.
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target( { ElementType.TYPE } )

View File

@ -36,6 +36,11 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* The @ManagedOperation annotation is used to indicate that a given method
* should be considered a JMX operation.
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target( { ElementType.METHOD } )

View File

@ -24,11 +24,28 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation is used to describe variables in method
* signatures so that when rendered into tools like JConsole
* it is clear what the parameters are. For example:
*
* public void doodle(@Name(value="doodle", description="A description of the argument") String doodle)
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Target( { ElementType.PARAMETER } )
public @interface Name
{
/**
* the name of the parameter
* @return
*/
String value();
/**
* the description of the parameter
* @return
*/
String description() default "";
}