org.javasimon.aop
Annotation Type Monitored


@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface Monitored

Annotation to mark classes and/or methods that should be monitored. A method is monitored when it is annotated, or when it is in a class that is annotated (or any of it's subclasses). Stopwatch is used as a monitor.

The Stopwatch name consists of a "name" part and a "suffix" part - these parts are provided using parameters of the annotation. Rules are as follows:

If no parameter is used, name of the Stopwatch will be: fully.qualified.ClassName.methodName

Current name resolution applies since version 3.1.

Author:
Erik van Oosten, Richard "Virgo" Richter

Optional Element Summary
 String name
          Returns the name for the Stopwatch without its possible suffix - default is the class name.
 String suffix
          Part added after the name part (which defaults to the class name or is specified on the class annotation).
 

name

public abstract String name
Returns the name for the Stopwatch without its possible suffix - default is the class name. Using the parameter on the method annotation overrides name from the class.

Returns:
name of the used monitor
Default:
""

suffix

public abstract String suffix
Part added after the name part (which defaults to the class name or is specified on the class annotation). This paramater is ignored for the class annotation or if the name parameter was specified on the method annotation. If not ignored, it is added to the Stopwatch name after the Simon name separator (.).

Returns:
suffix to be added to the name of the monitor
Default:
""


Copyright © 2013. All Rights Reserved.