Top Description Fields Constructors Methods
org.springframework.aop.interceptor

public abstract Class AbstractMonitoringInterceptor

extends AbstractTraceInterceptor
Class Inheritance
Known Direct Subclasses
org.springframework.aop.interceptor.PerformanceMonitorInterceptor
Annotations
@SuppressWarnings:serial
Imports
java.lang.reflect.Method, org.aopalliance.intercept.MethodInvocation, org.springframework.lang.Nullable

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 invokeUnderTrace implementation, subclasses should call the createInvocationTraceName method to create a name for the given trace, including information about the method invocation along with a prefix/suffix.

Authors
Rob Harrop, Juergen Hoeller
Since
1.2.7
See Also
setPrefix, setSuffix, createInvocationTraceName

Field Summary

Modifier and TypeField and Description
private boolean
private String
private String
Inherited from org.springframework.aop.interceptor.AbstractTraceInterceptor:
defaultLogger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
createInvocationTraceName(MethodInvocation invocation)

Create a String name for the given MethodInvocation that can be used for trace/logging purposes.

protected String
getPrefix()

Return the text that will get appended to the trace data.

protected String
getSuffix()

Return the text that will get prepended to the trace data.

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

public void
setPrefix(String prefix)

Set the text that will get appended to the trace data.

public void
setSuffix(String suffix)

Set the text that will get prepended to the trace data.

Inherited from org.springframework.aop.interceptor.AbstractTraceInterceptor:
getClassForLogginggetLoggerForInvocationinvokeinvokeUnderTraceisInterceptorEnabledisLogEnabledsetHideProxyClassNamessetLogExceptionStackTracesetLoggerNamesetUseDynamicLoggerwriteToLogwriteToLog

Field Detail

logTargetClassInvocationback to summary
private boolean logTargetClassInvocation
prefixback to summary
private String prefix
suffixback to summary
private String suffix

Constructor Detail

AbstractMonitoringInterceptorback to summary
public AbstractMonitoringInterceptor()

Method Detail

createInvocationTraceNameback to summary
protected String createInvocationTraceName(MethodInvocation invocation)

Create a String name for the given MethodInvocation that 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
setPrefix, setSuffix
getPrefixback to summary
protected String getPrefix()

Return the text that will get appended to the trace data.

getSuffixback to summary
protected String getSuffix()

Return the text that will get prepended to the trace data.

setLogTargetClassInvocationback to summary
public 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.

setPrefixback to summary
public void setPrefix(String prefix)

Set the text that will get appended to the trace data.

Default is none.

setSuffixback to summary
public void setSuffix(String suffix)

Set the text that will get prepended to the trace data.

Default is none.