org.javasimon.javaee
Class MethodStopwatchSource
java.lang.Object
org.javasimon.source.AbstractStopwatchSource<T>
org.javasimon.source.AbstractMethodStopwatchSource<javax.interceptor.InvocationContext>
org.javasimon.javaee.MethodStopwatchSource
- All Implemented Interfaces:
- MonitorSource<javax.interceptor.InvocationContext,Stopwatch>, StopwatchSource<javax.interceptor.InvocationContext>
public class MethodStopwatchSource
- extends AbstractMethodStopwatchSource<javax.interceptor.InvocationContext>
Provide stopwatch source for EJB and CDI invocation context.
Used by SimonInterceptor as default stopwatch source.
Can be overridden to customize monitored EJB methods and their
related Simon name.
- Author:
- gquintana
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_PREFIX
public static final String DEFAULT_PREFIX
- Default prefix for Simon names
- See Also:
- Constant Field Values
prefix
protected String prefix
- Simon name prefix - can be overridden in subclasses.
MethodStopwatchSource
public MethodStopwatchSource(Manager manager)
getPrefix
public String getPrefix()
setPrefix
public void setPrefix(String prefix)
getTargetClass
protected final Class<?> getTargetClass(javax.interceptor.InvocationContext context)
- Specified by:
getTargetClass in class AbstractMethodStopwatchSource<javax.interceptor.InvocationContext>
getTargetMethod
protected final Method getTargetMethod(javax.interceptor.InvocationContext context)
- Specified by:
getTargetMethod in class AbstractMethodStopwatchSource<javax.interceptor.InvocationContext>
getMonitorName
protected String getMonitorName(javax.interceptor.InvocationContext context)
- Returns Simon name for the specified Invocation context.
By default it contains the prefix + method name.
This method can be overridden.
- Specified by:
getMonitorName in class AbstractStopwatchSource<javax.interceptor.InvocationContext>
- Parameters:
context - Invocation context
- Returns:
- fully qualified name of the Simon
- Since:
- 3.1
Copyright © 2014. All rights reserved.