Package org.kairosdb.metrics4j.internal
Class SourceInvocationHandler
- java.lang.Object
-
- org.kairosdb.metrics4j.internal.SourceInvocationHandler
-
- All Implemented Interfaces:
InvocationHandler
public class SourceInvocationHandler extends Object implements InvocationHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOLLECTOR_PACKAGE
-
Constructor Summary
Constructors Constructor Description SourceInvocationHandler(MetricConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinvoke(Object proxy, Method method, Object[] args)voidsetCollector(MethodArgKey key, MetricCollector statsObject)Used to override a collector for a given set of arguments.
-
-
-
Field Detail
-
COLLECTOR_PACKAGE
public static final String COLLECTOR_PACKAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SourceInvocationHandler
public SourceInvocationHandler(MetricConfig config)
-
-
Method Detail
-
invoke
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
setCollector
public void setCollector(MethodArgKey key, MetricCollector statsObject)
Used to override a collector for a given set of arguments. Used for unit testing.- Parameters:
key- MethodArgKeystatsObject- Collector to use, typically a mock when used in unit tests.
-
-