org.javasimon.proxy
Class ProxyStopwatchSource<T>

java.lang.Object
  extended by org.javasimon.source.AbstractStopwatchSource<T>
      extended by org.javasimon.source.AbstractMethodStopwatchSource<DelegatingMethodInvocation<T>>
          extended by org.javasimon.proxy.ProxyStopwatchSource<T>
All Implemented Interfaces:
MonitorSource<DelegatingMethodInvocation<T>,Stopwatch>, StopwatchSource<DelegatingMethodInvocation<T>>

public class ProxyStopwatchSource<T>
extends AbstractMethodStopwatchSource<DelegatingMethodInvocation<T>>

Stopwatch source for use with proxy.

Author:
gquintana

Field Summary
private  String prefix
          Prefix used for simon name
 
Constructor Summary
ProxyStopwatchSource()
           
ProxyStopwatchSource(Manager manager)
           
 
Method Summary
protected  String getMonitorName(DelegatingMethodInvocation<T> location)
          Get monitor name for the given location.
 String getPrefix()
           
protected  Class<?> getTargetClass(DelegatingMethodInvocation<T> location)
          Get target class from location.
protected  Method getTargetMethod(DelegatingMethodInvocation<T> location)
          Get target method from location.
 void setPrefix(String prefix)
           
 
Methods inherited from class org.javasimon.source.AbstractMethodStopwatchSource
cache, getMonitor, newCacheStopwatchSource
 
Methods inherited from class org.javasimon.source.AbstractStopwatchSource
getManager, isMonitored, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefix

private String prefix
Prefix used for simon name

Constructor Detail

ProxyStopwatchSource

public ProxyStopwatchSource()

ProxyStopwatchSource

public ProxyStopwatchSource(Manager manager)
Method Detail

getPrefix

public String getPrefix()

setPrefix

public void setPrefix(String prefix)

getMonitorName

protected String getMonitorName(DelegatingMethodInvocation<T> location)
Description copied from class: AbstractStopwatchSource
Get monitor name for the given location.

Specified by:
getMonitorName in class AbstractStopwatchSource<DelegatingMethodInvocation<T>>

getTargetClass

protected final Class<?> getTargetClass(DelegatingMethodInvocation<T> location)
Description copied from class: AbstractMethodStopwatchSource
Get target class from location.

Specified by:
getTargetClass in class AbstractMethodStopwatchSource<DelegatingMethodInvocation<T>>
Parameters:
location - Location
Returns:
Target class

getTargetMethod

protected final Method getTargetMethod(DelegatingMethodInvocation<T> location)
Description copied from class: AbstractMethodStopwatchSource
Get target method from location.

Specified by:
getTargetMethod in class AbstractMethodStopwatchSource<DelegatingMethodInvocation<T>>
Parameters:
location - Location
Returns:
Target method


Copyright © 2013. All Rights Reserved.