类 PerformanceMonitorInterceptor
java.lang.Object
infra.aop.interceptor.AbstractTraceInterceptor
infra.aop.interceptor.AbstractMonitoringInterceptor
infra.aop.interceptor.PerformanceMonitorInterceptor
- 所有已实现的接口:
Serializable,Advice,Interceptor,MethodInterceptor
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.
-
字段概要
从类继承的字段 infra.aop.interceptor.AbstractTraceInterceptor
defaultLogger -
构造器概要
构造器构造器说明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 ObjectinvokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) Subclasses must override this method to perform any tracing around the suppliedMethodInvocation.从类继承的方法 infra.aop.interceptor.AbstractMonitoringInterceptor
createInvocationTraceName, getPrefix, getSuffix, setLogTargetClassInvocation, setPrefix, setSuffix从类继承的方法 infra.aop.interceptor.AbstractTraceInterceptor
getClassForLogging, getLoggerForInvocation, invoke, isInterceptorEnabled, isLogEnabled, setHideProxyClassNames, setLogExceptionStackTrace, setLoggerName, setUseDynamicLogger, writeToLog, writeToLog
-
构造器详细资料
-
PerformanceMonitorInterceptor
public PerformanceMonitorInterceptor()Create a new PerformanceMonitorInterceptor with a static logger. -
PerformanceMonitorInterceptor
public PerformanceMonitorInterceptor(boolean useDynamicLogger) Create a new PerformanceMonitorInterceptor with a dynamic or static logger, according to the given flag.- 参数:
useDynamicLogger- whether to use a dynamic logger or a static logger- 另请参阅:
-
-
方法详细资料
-
invokeUnderTrace
protected Object invokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) throws Throwable 从类复制的说明:AbstractTraceInterceptorSubclasses must override this method to perform any tracing around the suppliedMethodInvocation. Subclasses are responsible for ensuring that theMethodInvocationactually executes by callingMethodInvocation.proceed().By default, the passed-in
Loggerinstance will have log level "trace" enabled. Subclasses do not have to check for this again, unless they overwrite theisInterceptorEnabledmethod to modify the default behavior, and may delegate towriteToLogfor actual messages to be written.- 指定者:
invokeUnderTrace在类中AbstractTraceInterceptorlogger- theLoggerto write trace messages to- 返回:
- the result of the call to
MethodInvocation.proceed() - 抛出:
Throwable- if the call toMethodInvocation.proceed()encountered any errors- 另请参阅:
-