diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedAttribute.java b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedAttribute.java index cc12b3c0c35..df1cdd5d763 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedAttribute.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedAttribute.java @@ -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 } ) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedObject.java b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedObject.java index a323dc4cb2a..b51f2afe3c9 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedObject.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedObject.java @@ -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 } ) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedOperation.java b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedOperation.java index e65e0ba19e0..b9ff0257b60 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedOperation.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/ManagedOperation.java @@ -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 } ) diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/Name.java b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/Name.java index cfd631abd2f..5d7f1b74328 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/Name.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/annotation/Name.java @@ -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 ""; }