Class AbstractMonitoringInterceptor
java.lang.Object
org.springframework.aop.interceptor.AbstractTraceInterceptor
org.springframework.aop.interceptor.AbstractMonitoringInterceptor
- All Implemented Interfaces:
- Serializable, Advice, Interceptor, MethodInterceptor
- Direct Known Subclasses:
- PerformanceMonitorInterceptor
Base class for monitoring interceptors, such as performance monitors.
Provides configurable "prefix and "suffix" properties that help to
classify/group performance monitoring results.
In their AbstractTraceInterceptor.invokeUnderTrace(MethodInvocation, Log) implementation, subclasses should call the
createInvocationTraceName(MethodInvocation) method to create a name for the given trace,
including information about the method invocation along with a prefix/suffix.
- Since:
- 1.2.7
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from class AbstractTraceInterceptordefaultLogger
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringcreateInvocationTraceName(MethodInvocation invocation) Create aStringname for the givenMethodInvocationthat can be used for trace/logging purposes.protected StringReturn the text that will get appended to the trace data.protected StringReturn the text that will get prepended to the trace data.voidsetLogTargetClassInvocation(boolean logTargetClassInvocation) Set whether to log the invocation on the target class, if applicable (i.e.voidSet the text that will get appended to the trace data.voidSet the text that will get prepended to the trace data.
- 
Constructor Details- 
AbstractMonitoringInterceptorpublic AbstractMonitoringInterceptor()
 
- 
- 
Method Details- 
setPrefix
- 
getPrefixReturn the text that will get appended to the trace data.
- 
setSuffix
- 
getSuffixReturn the text that will get prepended to the trace data.
- 
setLogTargetClassInvocationpublic void setLogTargetClassInvocation(boolean logTargetClassInvocation) Set whether to log the invocation on the target class, if applicable (i.e. if the method is actually delegated to the target class).Default is "false", logging the invocation based on the proxy interface/class name. 
- 
createInvocationTraceNameCreate aStringname for the givenMethodInvocationthat can be used for trace/logging purposes. This name is made up of the configured prefix, followed by the fully-qualified name of the method being invoked, followed by the configured suffix.- See Also:
 
 
-