You can find examples of annotations usage in the examples project in GitHub: https://github.com/anotheria/moskito-examples/tree/master/aop.
The annotations themselves are part of the moskito-aop module and are located in the package: net.anotheria.moskito.aop.annotation.
MoSKito annotations are used with aspectj. The easiest way to use them in your maven project is to add following to your pom.
of course you should add dependency to the moskito-annotation lib somewhere first.
Alas, we recommend to add dependencies to moskito-core, moskito-webui, moskito-annotations explicitly and in same version.
@Monitor,@Count and @CountByParameter as well as future monitoring enabling annotations support three optional parameters.
|producerId||The id of the producer||Class name|
|subsystem||Subsystem of the producer||"default"|
|category||Category of the producer||"annotated"|
If used on a class - forces MoSKito to monitor the whole class including all methods, except those that are annotated with DontMonitor. Note that Monitor uses execution style pointcuts, therefore only the implementation code is monitored and has to be compile-time weaved.
Forces MoSKito to ignore annotated method in a class annotated with @Monitor.
SImilar to @Monitor but instead of monitoring the target class/method as a Service a simple counter monitoring is applied.
Can be applied to methods and uses the first parameter to the method as case separation.