Package org.apache.fulcrum.yaafi.interceptor.util

Examples of org.apache.fulcrum.yaafi.interceptor.util.StopWatch


    {
        if( this.getLogger().isErrorEnabled() )
        {
          if( this.isMonitorAllExceptions() || this.isServiceMonitored(interceptorContext) )
          {
              StopWatch stopWatch = this.getStopWatch(interceptorContext);
              stopWatch.stop();
              String msg = this.toString(interceptorContext, stopWatch, t);
              this.getLogger().error(msg);
          }
        }
    }
View Full Code Here


    {
        if( this.isServiceMonitored(interceptorContext) )
        {
            if( this.getLogger().isDebugEnabled() )
            {
                StopWatch stopWatch = this.getStopWatch(interceptorContext);
                stopWatch.stop();
                String msg = this.toString(interceptorContext, stopWatch, result);
                this.getLogger().debug(msg);
            }
        }
    }
View Full Code Here

     * @param interceptorContext the current interceptor context
     */
    protected void createStopWatch(
        AvalonInterceptorContext interceptorContext )
    {
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        interceptorContext.getRequestContext().put(this.getServiceName(),stopWatch);
    }
View Full Code Here

     * @return the stop watch
     */
    protected StopWatch getStopWatch(
        AvalonInterceptorContext interceptorContext )
    {
        StopWatch result = (StopWatch) interceptorContext.getRequestContext().remove(
            this.getServiceName()
            );

        if( result == null )
        {
            result = new StopWatch();
            result.start();
        }

        return result;
    }
View Full Code Here

     */
    public void onError(AvalonInterceptorContext interceptorContext,Throwable t)
    {
        if( this.isServiceMonitored(interceptorContext) )
        {
            StopWatch stopWatch = this.getStopWatch(interceptorContext);
            stopWatch.stop();
            this.log( ON_ERROR, interceptorContext, stopWatch );
        }
    }
View Full Code Here

    {
        if( this.isServiceMonitored(interceptorContext) )
        {
            if( this.isServiceMonitored(interceptorContext) )
            {
                StopWatch stopWatch = this.getStopWatch(interceptorContext);
                stopWatch.stop();
                this.log( ON_EXIT, interceptorContext, stopWatch );
            }
        }
    }
View Full Code Here

     * @param interceptorContext the current interceptor context
     */
    protected void createStopWatch(
        AvalonInterceptorContext interceptorContext )
    {
        StopWatch stopWatch = new StopWatch();
        stopWatch.start();
        interceptorContext.getRequestContext().put(this.getServiceName(),stopWatch);
    }
View Full Code Here

TOP

Related Classes of org.apache.fulcrum.yaafi.interceptor.util.StopWatch

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.