Class DataCollector

  • All Implemented Interfaces:
    Runnable

    public class DataCollector
    extends Object
    implements Runnable
    Data collector module.
    • Method Detail

      • shutdown

        public void shutdown()
        Shut down all resources.
      • run

        public void run()
        Specified by:
        run in interface Runnable
      • 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.