org.omnaest.utils.time
Class DurationCaptureTypeFactory

java.lang.Object
  extended by org.omnaest.utils.time.DurationCaptureTypeFactory

public class DurationCaptureTypeFactory
extends Object

Proxy creator the measure the time for methods calls of an arbitrary object.

Author:
Omnaest
See Also:
newStubInstance(Object), DurationCapture

Nested Class Summary
static interface DurationCaptureTypeFactory.DurationCaptureAware
          Defines the interface which proxied Objects will implement, too.
protected static class DurationCaptureTypeFactory.MethodInterceptorDurationCapture
           
 
Constructor Summary
DurationCaptureTypeFactory()
           
 
Method Summary
static
<E> E
newStubInstance(E object)
          Creates a proxy stub for a given object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DurationCaptureTypeFactory

public DurationCaptureTypeFactory()
Method Detail

newStubInstance

public static <E> E newStubInstance(E object)
Creates a proxy stub for a given object. The object will be still called like always, but the time for the method execution will be measured and can be accessed by casting the stub to the DurationCaptureTypeFactory.DurationCaptureAware interface and retrieving the DurationCapture by DurationCaptureTypeFactory.DurationCaptureAware.getDurationCapture().



Copyright © 2013. All Rights Reserved.