public final class TimedInterface
extends java.lang.Object
Proxy
monitor that tracks all calls to methods
of an interface.
IDummy dummy = TimedInterface.newProxy(IDummy.class, new DummyImpl(), "id"); DefaultMonitorRegistry.getInstance().register((CompositeMonitor)dummy);
All calls to methods implemented by IDummy would have an associated BasicTimer with them. The
name for the CompositeMonitor
is the name of the method. Additional tags are added:
interface
interface being implemented.
class
simple name of the concrete class implementing the interface.
id
(Optional) An identifier for this particular instance.
Modifier and Type | Method and Description |
---|---|
static <T> T |
newProxy(java.lang.Class<T> ctype,
T concrete)
Creates a new TimedInterface for a given interface
ctype with a concrete class
concrete . |
static <T> T |
newProxy(java.lang.Class<T> ctype,
T concrete,
java.lang.String id)
Creates a new TimedInterface for a given interface
ctype with a concrete class
concrete and a specific id. |
public static <T> T newProxy(java.lang.Class<T> ctype, T concrete, java.lang.String id)
ctype
with a concrete class
concrete
and a specific id. The id can be used to distinguish among multiple
objects with the same concrete class.public static <T> T newProxy(java.lang.Class<T> ctype, T concrete)
ctype
with a concrete class
concrete
.