public class MetricBuilder extends Object
| Modifier and Type | Method and Description |
|---|---|
Metric |
addMetric(String metricName)
Adds a metric to the builder.
|
Metric |
addMetric(String metricName,
String registeredType)
Adds a metric to the builder with a customer type.
|
String |
build()
Returns the JSON string built by the builder.
|
static MetricBuilder |
getInstance()
Returns a new metric builder.
|
List<Metric> |
getMetrics()
Returns a list of metrics added to the builder.
|
public static MetricBuilder getInstance()
public Metric addMetric(String metricName)
metricName - metric namepublic Metric addMetric(String metricName, String registeredType)
metricName - metric nameregisteredType - type used to deserialize the json on the serverpublic List<Metric> getMetrics()
public String build() throws IOException
IOException - if metrics cannot be converted to JSONCopyright © 2014. All rights reserved.