public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterceptor
In their AbstractTraceInterceptor.invokeUnderTrace(org.aopalliance.intercept.MethodInvocation, org.apache.commons.logging.Log)
implementation, subclasses should call the
createInvocationTraceName(org.aopalliance.intercept.MethodInvocation)
method to create a name for the given trace,
including information about the method invocation along with a prefix/suffix.
setPrefix(java.lang.String)
,
setSuffix(java.lang.String)
,
createInvocationTraceName(org.aopalliance.intercept.MethodInvocation)
,
Serialized FormdefaultLogger
Constructor and Description |
---|
AbstractMonitoringInterceptor() |
Modifier and Type | Method 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.
|
void |
setLogTargetClassInvocation(boolean logTargetClassInvocation)
Set whether to log the invocation on the target class, if applicable
(i.e.
|
void |
setPrefix(String prefix)
Set the text that will get appended to the trace data.
|
void |
setSuffix(String suffix)
Set the text that will get prepended to the trace data.
|
getClassForLogging, getLoggerForInvocation, invoke, invokeUnderTrace, isInterceptorEnabled, isLogEnabled, setHideProxyClassNames, setLogExceptionStackTrace, setLoggerName, setUseDynamicLogger, writeToLog, writeToLog
public void setPrefix(String prefix)
Default is none.
protected String getPrefix()
public void setSuffix(String suffix)
Default is none.
protected String getSuffix()
public void setLogTargetClassInvocation(boolean logTargetClassInvocation)
Default is "false", logging the invocation based on the proxy interface/class name.
protected String createInvocationTraceName(MethodInvocation invocation)
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.