package org.automon;

/**
 * Created by stevesouza on 2/26/15.
 */
public interface OpenMon<T> {
    public T start(String label);
    public void stop(T timer);
    public void exception(String label);
    public void enable(boolean enable);
    public boolean isEnabled();
}

@@ -26,221 +26,1978 @@
 %0A * 
-Created by stevesouza on 2/26/15.%0A */%0Apublic interface OpenMon%3CT%3E %7B%0A    public T start(String label);%0A    public void stop(T timer);%0A    public void exception(String label);%0A    public void enable(boolean enable);
+Implementations of this interface can be called automatically by aspectJ pointcuts to monitor your system.  %0A */%0Apublic interface OpenMon%3CT%3E %7B%0A    /**%0A     * Called by aspectJ as part of aroundAdvice. It is typically used to start a timer, however anything could be done%0A     * such as logging the start of the method.%0A     *%0A     * @param label The method name or any identifying context.%0A     * @return Any Object can be returned.  It will be passed back into the stop(..) method.  Typically this would be a timer%0A     * that can later be stopped.%0A     */%0A    public T start(String label);%0A%0A    /**%0A     * Called as part of AspectJ's 'around' advice.  It is called after the event such as a method has completed. Typically%0A     * a timer that was started in the 'start' method above would be stopped.  Although anything can be done.%0A     *%0A     * @param timer The object returned by 'start' is passed in.  Typically this would be a timer and should be stopped.%0A     *              Note although this variable is named 'timer' for the common case it can really be any object.%0A     */%0A    public void stop(T timer);%0A%0A    /**%0A     * Nofitication that an exception has occurred. Typically the implementing class would count exceptions though anything is possible.%0A     *%0A     * @param label The name identifier for the exception.%0A     */%0A    public void exception(String label);%0A%0A    /**%0A     * Enable/or disable monitoring.  At a minimum this capability should enable/disable the Advice for timing and counting exceptions.%0A     * It may also enable/disable the underlying monitoring implementations overall ability to monitor%0A     * (for example call Jamon's MontiorFactory.disable() method). This is the recommended implementation though not required.%0A     *%0A     * @param enable Enable/disable monitoring%0A     */%0A    public void enable(boolean enable);%0A%0A    /**%0A     *%0A     * @return True indicates monitoring is enabled, false indicates monitoring is disabled.%0A     */
 %0A   

refactor - added comments