Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.aop.interceptor
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:
  JamonPerformanceMonitorInterceptor, PerformanceMonitorInterceptor

    public abstract class AbstractMonitoringInterceptor

extends AbstractTraceInterceptor

Base class for monitoring interceptors, such as performance monitors. Provides `prefix` and `suffix` properties that help to classify/group performance monitoring results.

Subclasses 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.

Since:
  1.2.7
Author:
  Rob Harrop, Juergen Hoeller
See Also:
  `setPrefix(java.lang.String)`, `setSuffix(java.lang.String)`, `createInvocationTraceName(org.aopalliance.intercept.MethodInvocation)`, Serialized Form

Field Summary

Fields inherited from class org.springframework.aop.interceptor.AbstractTraceInterceptor
`defaultLogger`

Constructor Summary
`AbstractMonitoringInterceptor()`

Method Summary
`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` | `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.

Methods inherited from class org.springframework.aop.interceptor.AbstractTraceInterceptor
`getLoggerForInvocation, invoke, invokeUnderTrace, isInterceptorEnabled, isLogEnabled, setHideProxyClassNames, setLoggerName, setUseDynamicLogger`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractMonitoringInterceptor

    public AbstractMonitoringInterceptor()

Method Detail

### setPrefix

    public void setPrefix(String prefix)

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

  Default is none.

### getPrefix

    protected String getPrefix()

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

### setSuffix

    public void setSuffix(String suffix)

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

  Default is none.

### getSuffix

    protected String getSuffix()

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

### createInvocationTraceName

    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(java.lang.String)`, `setSuffix(java.lang.String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2007 The Spring Framework.