Package com.thingworx.common.utils
Class ThingworxMetric
- java.lang.Object
-
- com.thingworx.common.utils.ThingworxMetric
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class ThingworxMetric extends java.lang.Object
Static helpers for easily creating Thingworx Metrics data. Implemented as statics to avoid the overhead of creating a wrapper object around ValueCollection. Intended to be used with InfoTables: it.addRow(ThingworxMetric.create("MetricName", "Metric Description", metric_value));
-
-
Constructor Summary
Constructors Constructor Description ThingworxMetric()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValueCollection
create(java.lang.String name, java.lang.String description, double value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.static ValueCollection
create(java.lang.String name, java.lang.String description, int value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.static ValueCollection
create(java.lang.String name, java.lang.String description, long value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.static ValueCollection
create(java.lang.String name, java.lang.String description, NumberPrimitive value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.
-
-
-
Method Detail
-
create
@ThingworxExtensionApiMethod(since={6,6}) public static ValueCollection create(java.lang.String name, java.lang.String description, long value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.- Parameters:
name
- Name of the metricdescription
- Description of the metricvalue
- The metrics value- Returns:
- A ValueCollection representing the metric
-
create
@ThingworxExtensionApiMethod(since={6,6}) public static ValueCollection create(java.lang.String name, java.lang.String description, int value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.- Parameters:
name
- Name of the metricdescription
- Description of the metricvalue
- The metrics value- Returns:
- A ValueCollection representing the metric
-
create
@ThingworxExtensionApiMethod(since={6,6}) public static ValueCollection create(java.lang.String name, java.lang.String description, double value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.- Parameters:
name
- Name of the metricdescription
- Description of the metricvalue
- The metrics value- Returns:
- A ValueCollection representing the metric
-
create
@ThingworxExtensionApiMethod(since={6,6}) public static ValueCollection create(java.lang.String name, java.lang.String description, NumberPrimitive value)
Create a ValueCollection that can be added to an InfoTable as a row, representing a single metric.- Parameters:
name
- Name of the metricdescription
- Description of the metricvalue
- The metrics value- Returns:
- A ValueCollection representing the metric
-
-