public class SpringStopwatchSource extends AbstractMethodStopwatchSource<org.aopalliance.intercept.MethodInvocation>
Constructor and Description |
---|
SpringStopwatchSource(Manager manager)
Constructor with specified
Manager . |
Modifier and Type | Method and Description |
---|---|
protected String |
getMeaningfulClassName(Class<?> targetClass) |
protected String |
getMonitorName(org.aopalliance.intercept.MethodInvocation methodInvocation)
Returns monitor name for the given method invocation with
Monitored.name()
and Monitored.suffix() applied as expected. |
protected Class<?> |
getTargetClass(org.aopalliance.intercept.MethodInvocation methodInvocation)
Get target class.
|
protected Method |
getTargetMethod(org.aopalliance.intercept.MethodInvocation methodInvocation)
Get method being invoked.
|
boolean |
isMonitored(org.aopalliance.intercept.MethodInvocation methodInvocation)
By default returns
true because it is expected to be called from MonitoringInterceptor which means that the method call
should be monitored. |
cache
getManager, getMonitor, start
public SpringStopwatchSource(Manager manager)
Manager
.manager
- Simon manager used for producing Stopwatchesprotected final Class<?> getTargetClass(org.aopalliance.intercept.MethodInvocation methodInvocation)
getTargetClass
in class AbstractMethodStopwatchSource<org.aopalliance.intercept.MethodInvocation>
methodInvocation
- Locationprotected Method getTargetMethod(org.aopalliance.intercept.MethodInvocation methodInvocation)
getTargetMethod
in class AbstractMethodStopwatchSource<org.aopalliance.intercept.MethodInvocation>
methodInvocation
- Method invocationpublic boolean isMonitored(org.aopalliance.intercept.MethodInvocation methodInvocation)
true
because it is expected to be called from MonitoringInterceptor
which means that the method call
should be monitored. Pointcuts provided enough mechanism to decide whether the method is monitored or not, but this method can be overridden
if needed.isMonitored
in interface MonitorSource<org.aopalliance.intercept.MethodInvocation,Stopwatch>
isMonitored
in class AbstractStopwatchSource<org.aopalliance.intercept.MethodInvocation>
methodInvocation
- current method invocationprotected String getMonitorName(org.aopalliance.intercept.MethodInvocation methodInvocation)
Monitored.name()
and Monitored.suffix()
applied as expected.getMonitorName
in class AbstractStopwatchSource<org.aopalliance.intercept.MethodInvocation>
methodInvocation
- current method invocationprotected String getMeaningfulClassName(Class<?> targetClass)
Copyright © 2019. All rights reserved.