Package com.hivemq.adapter.sdk.api.data
Interface ProtocolAdapterDataSample
public interface ProtocolAdapterDataSample
Interface for data collected by a protocol adapter.
One sample can contain multiple data points (= tag values).
The actual data points can be added via the addDataPoint(DataPoint) method.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataPoint(@NotNull DataPoint dataPoint) Adds a new data point to this sample.voidaddDataPoint(@NotNull String tagName, @NotNull Object tagValue) Adds a new data point to this sample.voidsetDataPoints(@NotNull List<DataPoint> list) Sets/Overwrites all data points of the sample with the given argument.
-
Method Details
-
getPollingContext
- Returns:
- the
PollingContextcontaining information how the data gets published by the broker.
-
getTimestamp
- Returns:
- the timestamp when this data sample was taken.
-
addDataPoint
Adds a new data point to this sample.- Parameters:
tagName- the name for this data point.tagValue- the value for this data point.
-
addDataPoint
Adds a new data point to this sample.- Parameters:
dataPoint- the data point.
-
setDataPoints
Sets/Overwrites all data points of the sample with the given argument.- Parameters:
list- the new list of data points for this sample.
-
getDataPoints
- Returns:
- the list of data points in this sample.
-