public class

PerformanceMonitorInterceptor

extends AbstractMonitoringInterceptor
java.lang.Object
   ↳ org.springframework.aop.interceptor.AbstractTraceInterceptor
     ↳ org.springframework.aop.interceptor.AbstractMonitoringInterceptor
       ↳ org.springframework.aop.interceptor.PerformanceMonitorInterceptor

Class Overview

Simple AOP Alliance MethodInterceptor for performance monitoring. This interceptor has no effect on the intercepted method call.

Uses a StopWatch for the actual performance measuring.

Summary

[Expand]
Inherited Fields
From class org.springframework.aop.interceptor.AbstractTraceInterceptor
Public Constructors
PerformanceMonitorInterceptor()
Create a new PerformanceMonitorInterceptor with a static logger.
PerformanceMonitorInterceptor(boolean useDynamicLogger)
Create a new PerformanceMonitorInterceptor with a dynamic or static logger, according to the given flag.
Protected Methods
Object invokeUnderTrace(MethodInvocation invocation, Log logger)
Subclasses must override this method to perform any tracing around the supplied MethodInvocation.
[Expand]
Inherited Methods
From class org.springframework.aop.interceptor.AbstractMonitoringInterceptor
From class org.springframework.aop.interceptor.AbstractTraceInterceptor
From class java.lang.Object

Public Constructors

public PerformanceMonitorInterceptor ()

Create a new PerformanceMonitorInterceptor with a static logger.

public PerformanceMonitorInterceptor (boolean useDynamicLogger)

Create a new PerformanceMonitorInterceptor with a dynamic or static logger, according to the given flag.

Parameters
useDynamicLogger whether to use a dynamic logger or a static logger

Protected Methods

protected Object invokeUnderTrace (MethodInvocation invocation, Log logger)

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().

By default, the passed-in Log instance will have log level "trace" enabled. Subclasses do not have to check for this again, unless they overwrite the isInterceptorEnabled method to modify the default behavior.

Parameters
logger the Log to write trace messages to
Returns
  • the result of the call to MethodInvocation.proceed()
Throws
Throwable