Class DataCollector
- java.lang.Object
-
- com.facebook.openwifi.rrm.modules.DataCollector
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DataCollector.DataListener
Data listener interface.
-
Constructor Summary
Constructors Constructor Description DataCollector(RRMConfig.ModuleConfig.DataCollectorParams params, DeviceDataManager deviceDataManager, UCentralClient client, UCentralKafkaConsumer consumer, ConfigManager configManager, DatabaseManager dbManager)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataListener(String id, DataCollector.DataListener listener)
Add/overwrite a data listener with an arbitrary identifier.protected static void
parseStateRecord(String serialNumber, com.google.gson.JsonObject payload, List<StateRecord> results)
Parse a single state record into individual metrics.boolean
removeDataListener(String id)
Remove a data listener with the given identifier, returning true if anything was actually removed.void
run()
void
shutdown()
Shut down all resources.
-
-
-
Constructor Detail
-
DataCollector
public DataCollector(RRMConfig.ModuleConfig.DataCollectorParams params, DeviceDataManager deviceDataManager, UCentralClient client, UCentralKafkaConsumer consumer, ConfigManager configManager, DatabaseManager dbManager)
Constructor.
-
-
Method Detail
-
shutdown
public void shutdown()
Shut down all resources.
-
parseStateRecord
protected static void parseStateRecord(String serialNumber, com.google.gson.JsonObject payload, List<StateRecord> results)
Parse a single state record into individual metrics.
-
addDataListener
public void addDataListener(String id, DataCollector.DataListener listener)
Add/overwrite a data listener with an arbitrary identifier. The "id" string determines the order in which listeners are called.
-
removeDataListener
public boolean removeDataListener(String id)
Remove a data listener with the given identifier, returning true if anything was actually removed.
-
-