com.antelmann.util
Class InterfaceMonitor.Profiler
java.lang.Object
com.antelmann.util.InterfaceMonitor.Adapter
com.antelmann.util.InterfaceMonitor.Profiler
- All Implemented Interfaces:
- InterfaceMonitor
- Enclosing interface:
- InterfaceMonitor
public static class InterfaceMonitor.Profiler
- extends InterfaceMonitor.Adapter
allows to profile the access to an interface
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterfaceMonitor.Profiler
public InterfaceMonitor.Profiler()
methodInvoked
public void methodInvoked(Object obj,
Method m,
Object[] args,
long timeTaken,
Object returnValue,
Throwable t)
- Description copied from interface:
InterfaceMonitor
- called after the given method on the given object with the given arguments has been executed.
Of the last two arguments, one is always null while the other contains a value.
Note that this method is synchronously called before the return value (or the exception to be thrown)
is passed to the caller of the proxy object.
- Specified by:
methodInvoked in interface InterfaceMonitor- Overrides:
methodInvoked in class InterfaceMonitor.Adapter
- Parameters:
obj - the original object that the given method was invoked onm - the method that was executed on the given objectargs - the arguments that were used for the given method call (may be null)timeTaken - the time it took to execute the given method in millisecondsreturnValue - the value returned by the given method call (if no exception was thrown; otherwise null)t - contains the exception thrown by the given method call (if any);
if the Throwable is null, the returnValue is not and vice versa.
getProfileData
public Map<Method,DataPoint> getProfileData()
- provides performance data over the wrapped instance;
the DataPoint is based on the time each call took.
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads