org.springframework.aop.interceptor
Class AbstractPerformanceMonitorInterceptor

java.lang.Object
  extended by org.springframework.aop.interceptor.AbstractTraceInterceptor
      extended by org.springframework.aop.interceptor.AbstractPerformanceMonitorInterceptor
All Implemented Interfaces:
Serializable, Advice, Interceptor, MethodInterceptor
Direct Known Subclasses:
JamonPerformanceMonitorInterceptor, PerformanceMonitorInterceptor

public abstract class AbstractPerformanceMonitorInterceptor
extends AbstractTraceInterceptor

Base class for performance monitoring interceptors. Provide prefix and suffix properties that help to classify/group performance monitoring results.

Sub-classes should call the createInvocationTraceName(MethodInvocation) method to create a name for the given trace that includes information about the method invocation under trace along with the prefix and suffix added as appropriate.

Author:
Rob Harrop
See Also:
setPrefix(String), setSuffix(String), createInvocationTraceName(org.aopalliance.intercept.MethodInvocation), Serialized Form

Field Summary
 
Fields inherited from class org.springframework.aop.interceptor.AbstractTraceInterceptor
defaultLogger
 
Constructor Summary
AbstractPerformanceMonitorInterceptor()
           
 
Method Summary
protected  String createInvocationTraceName(MethodInvocation invocation)
          Creates a String name for the given MethodInvocation that can be used for trace/logging purposes.
protected  String getPrefix()
           
protected  String getSuffix()
           
 void setPrefix(String prefix)
          Sets the String value that gets appended to the trace data used by performance monitoring interceptors.
 void setSuffix(String suffix)
          Sets the String value that gets prepended to the trace data used by performance monitoring interceptors.
 
Methods inherited from class org.springframework.aop.interceptor.AbstractTraceInterceptor
getLoggerForInvocation, invoke, invokeUnderTrace, setUseDynamicLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPerformanceMonitorInterceptor

public AbstractPerformanceMonitorInterceptor()
Method Detail

getPrefix

protected String getPrefix()

setPrefix

public void setPrefix(String prefix)
Sets the String value that gets appended to the trace data used by performance monitoring interceptors.

See Also:
createInvocationTraceName(org.aopalliance.intercept.MethodInvocation)

getSuffix

protected String getSuffix()

setSuffix

public void setSuffix(String suffix)
Sets the String value that gets prepended to the trace data used by performance monitoring interceptors.

See Also:
createInvocationTraceName(org.aopalliance.intercept.MethodInvocation)

createInvocationTraceName

protected String createInvocationTraceName(MethodInvocation invocation)
Creates 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(String), setSuffix(String)


Copyright (c) 2002-2005 The Spring Framework Project.