Class TagAggregateProcessor<T extends DataProcessor>

  • All Implemented Interfaces:
    DataHandler, DataProcessor

    public class TagAggregateProcessor<T extends DataProcessor>
    extends java.lang.Object
    implements DataProcessor
    Processes values broken up by tag id. Operates on the notion that takeProcessed will be called directly after putValue. With this in mind, the system can hold the last processor and go to it, preventing the need to loop through all processors looking for changes.
    • Method Detail

      • getDataProcessors

        public java.util.Collection<T> getDataProcessors()
      • getProcessor

        protected T getProcessor​(java.lang.Integer tagId)
      • putValue

        public void putValue​(RawTagValue inValue)
                      throws java.lang.Exception
        Description copied from interface: DataHandler
        Insert a value into the handler.
        Specified by:
        putValue in interface DataHandler
        Throws:
        java.lang.Exception
      • takeProcessed

        public java.util.List<RawTagValue> takeProcessed()
        Description copied from interface: DataProcessor
        Returns processed values, if any are ready. Otherwise returns null. Should also be called after flush to get any remaining values.
        Specified by:
        takeProcessed in interface DataProcessor
      • flush

        public void flush()
                   throws java.lang.Exception
        Description copied from interface: DataHandler
        Indicate that the handler won't get any more data, at least for a while.
        Specified by:
        flush in interface DataHandler
        Throws:
        java.lang.Exception