org.springframework.aop.interceptor
Class JamonPerformanceMonitorInterceptor
java.lang.Object
org.springframework.aop.interceptor.AbstractTraceInterceptor
org.springframework.aop.interceptor.AbstractPerformanceMonitorInterceptor
org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor
- All Implemented Interfaces:
- Serializable, Advice, Interceptor, MethodInterceptor
public class JamonPerformanceMonitorInterceptor
- extends AbstractPerformanceMonitorInterceptor
Performance monitor interceptor that uses JAMon library
to perform the performance measurement on the intercepted method
and output the stats.
This code is inspired by Thierry Templier's blog.
- Since:
- 1.1.3
- Author:
- Dmitriy Kopylenko, Juergen Hoeller, Rob Harrop
- See Also:
MonitorFactory
,
PerformanceMonitorInterceptor
,
Serialized Form
Method Summary |
protected Object |
invokeUnderTrace(MethodInvocation invocation,
org.apache.commons.logging.Log logger)
Subclasses must override this method to perform any tracing around the
supplied MethodInvocation . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JamonPerformanceMonitorInterceptor
public JamonPerformanceMonitorInterceptor()
- Create a new JamonPerformanceMonitorInterceptor with a static logger.
JamonPerformanceMonitorInterceptor
public JamonPerformanceMonitorInterceptor(boolean useDynamicLogger)
- Create a new JamonPerformanceMonitorInterceptor with a dynamic or static logger,
according to the given flag.
- Parameters:
useDynamicLogger
- whether to use a dynamic logger or a static logger- See Also:
AbstractTraceInterceptor.setUseDynamicLogger(boolean)
invokeUnderTrace
protected Object invokeUnderTrace(MethodInvocation invocation,
org.apache.commons.logging.Log logger)
throws Throwable
- Description copied from class:
AbstractTraceInterceptor
- Subclasses must override this method to perform any tracing around the
supplied
MethodInvocation
. Subclasses are responsible for
ensuring that the MethodInvocation
actually executes by
calling MethodInvocation.proceed()
.
The passed-in Log
instance will have log level "trace"
enabled. Subclasses do not have to check for this again.
- Specified by:
invokeUnderTrace
in class AbstractTraceInterceptor
logger
- the Log
to write trace messages to
- Returns:
- the result of the call to
MethodInvocation.proceed()
- Throws:
Throwable
- if the call to MethodInvocation.proceed()
encountered any errors
Copyright (c) 2002-2005 The Spring Framework Project.