|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sensor.support.spring.MethodTimingInterceptor
Spring method interceptor that wraps a method call in a Sensor Timer
using the dependency injected TimerRuntime
.
Method signature util methods copied from the extended JamonIntercepter as blogged by Gerald Loeffler.
Constructor Summary | |
MethodTimingInterceptor()
|
Method Summary | |
Object |
invoke(org.aopalliance.intercept.MethodInvocation mi)
Wraps the intercepted method call in a Timer using the method signature as the Timer label. |
void |
setAssociatedLabels(Set associatedLabels)
Sets the associatedLabels. |
void |
setTimerRuntime(net.sf.sensor.timer.TimerRuntime timerRuntime)
Sets the timerRuntime. |
void |
setUseParamTypesInId(boolean useParamTypesInId)
Sets the property that controls whether the generated Timer
label will contain the method parameter types or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MethodTimingInterceptor()
Method Detail |
public Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws Throwable
TimerRuntime
available, this
method proceeds with the intercepted method without doing anything else.
invoke
in interface org.aopalliance.intercept.MethodInterceptor
Throwable
MethodInterceptor.invoke(org.aopalliance.intercept.MethodInvocation)
public void setTimerRuntime(net.sf.sensor.timer.TimerRuntime timerRuntime)
timerRuntime
- The timerRuntime to set.public void setAssociatedLabels(Set associatedLabels)
associatedLabels
- The associatedLabels to set.public void setUseParamTypesInId(boolean useParamTypesInId)
Timer
label will contain the method parameter types or not. Defaults to true.
useParamTypesInId
- The useParamTypesInId to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |