类 SimpleTraceInterceptor
java.lang.Object
infra.aop.interceptor.AbstractTraceInterceptor
infra.aop.interceptor.SimpleTraceInterceptor
- 所有已实现的接口:
Serializable,Advice,Interceptor,MethodInterceptor
- 直接已知子类:
DebugInterceptor
Simple AOP Alliance
MethodInterceptor that can be introduced
in a chain to display verbose trace information about intercepted method
invocations, with method entry and method exit info.
Consider using CustomizableTraceInterceptor for more
advanced needs.
- 从以下版本开始:
- 3.0
- 作者:
- Dmitriy Kopylenko, Juergen Hoeller, TODAY
- 另请参阅:
-
字段概要
从类继承的字段 infra.aop.interceptor.AbstractTraceInterceptor
defaultLogger -
构造器概要
构造器构造器说明Create a new SimpleTraceInterceptor with a static logger.SimpleTraceInterceptor(boolean useDynamicLogger) Create a new SimpleTraceInterceptor with dynamic or static logger, according to the given flag. -
方法概要
修饰符和类型方法说明protected StringgetInvocationDescription(MethodInvocation invocation) Return a description for the given method invocation.protected ObjectinvokeUnderTrace(MethodInvocation invocation, infra.logging.Logger logger) Subclasses must override this method to perform any tracing around the suppliedMethodInvocation.从类继承的方法 infra.aop.interceptor.AbstractTraceInterceptor
getClassForLogging, getLoggerForInvocation, invoke, isInterceptorEnabled, isLogEnabled, setHideProxyClassNames, setLogExceptionStackTrace, setLoggerName, setUseDynamicLogger, writeToLog, writeToLog
-
构造器详细资料
-
SimpleTraceInterceptor
public SimpleTraceInterceptor()Create a new SimpleTraceInterceptor with a static logger. -
SimpleTraceInterceptor
public SimpleTraceInterceptor(boolean useDynamicLogger) Create a new SimpleTraceInterceptor with 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- 另请参阅:
-
getInvocationDescription
Return a description for the given method invocation.- 参数:
invocation- the invocation to describe- 返回:
- the description
-