| java.lang.Object org.springframework.aop.interceptor.AbstractTraceInterceptor org.springframework.aop.interceptor.AbstractMonitoringInterceptor org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor
JamonPerformanceMonitorInterceptor | public class JamonPerformanceMonitorInterceptor extends AbstractMonitoringInterceptor (Code) | | 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.
author: Dmitriy Kopylenko author: Juergen Hoeller author: Rob Harrop since: 1.1.3 See Also: com.jamonapi.MonitorFactory See Also: PerformanceMonitorInterceptor |
Constructor Summary | |
public | JamonPerformanceMonitorInterceptor() Create a new JamonPerformanceMonitorInterceptor with a static logger. | public | JamonPerformanceMonitorInterceptor(boolean useDynamicLogger) Create a new JamonPerformanceMonitorInterceptor with a dynamic or static logger,
according to the given flag. | public | JamonPerformanceMonitorInterceptor(boolean useDynamicLogger, boolean trackAllInvocations) Create a new JamonPerformanceMonitorInterceptor with a dynamic or static logger,
according to the given flag. |
Method Summary | |
protected Object | invokeUnderTrace(MethodInvocation invocation, Log logger) Wraps the invocation with a JAMon Monitor and writes the current
performance statistics to the log (if enabled). | protected boolean | isInterceptorEnabled(MethodInvocation invocation, Log logger) Always applies the interceptor if the "trackAllInvocations" flag has been set;
else just kicks in if the log is enabled. | public void | setTrackAllInvocations(boolean trackAllInvocations) Set whether to track all invocations that go through this interceptor,
or just invocations with trace logging enabled.
Default is "false": Only invocations with trace logging enabled will
be monitored. |
JamonPerformanceMonitorInterceptor | public JamonPerformanceMonitorInterceptor()(Code) | | Create a new JamonPerformanceMonitorInterceptor with a static logger.
|
JamonPerformanceMonitorInterceptor | public JamonPerformanceMonitorInterceptor(boolean useDynamicLogger)(Code) | | 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: JamonPerformanceMonitorInterceptor.setUseDynamicLogger |
JamonPerformanceMonitorInterceptor | public JamonPerformanceMonitorInterceptor(boolean useDynamicLogger, boolean trackAllInvocations)(Code) | | 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 Parameters: trackAllInvocations - whether to track all invocations that go throughthis interceptor, or just invocations with trace logging enabled See Also: JamonPerformanceMonitorInterceptor.setUseDynamicLogger |
invokeUnderTrace | protected Object invokeUnderTrace(MethodInvocation invocation, Log logger) throws Throwable(Code) | | Wraps the invocation with a JAMon Monitor and writes the current
performance statistics to the log (if enabled).
See Also: com.jamonapi.MonitorFactory.start See Also: com.jamonapi.Monitor.stop |
setTrackAllInvocations | public void setTrackAllInvocations(boolean trackAllInvocations)(Code) | | Set whether to track all invocations that go through this interceptor,
or just invocations with trace logging enabled.
Default is "false": Only invocations with trace logging enabled will
be monitored. Specify "true" to let JAMon track all invocations,
gathering statistics even when trace logging is disabled.
|
Fields inherited from org.springframework.aop.interceptor.AbstractTraceInterceptor | protected transient Log defaultLogger(Code)(Java Doc)
|
|
|