Class TextCollectMonitor

  • All Implemented Interfaces:
    CollectListener

    public class TextCollectMonitor
    extends java.lang.Object
    implements CollectListener
    Author:
    Bruno Dillenseger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected long bladesize  
      protected long fullsize  
      protected long progress  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bladeCollectStart​(java.lang.String bladeId, long size)
      Called before collecting test results from a blade.
      void collectStart​(java.lang.String testId, long size)
      Called at the collect beginning.
      void done()
      Called when the full collect is complete.
      boolean isCanceled()
      Called an arbitrarily number of times at arbitrary moments during a collect to ensure the collect must go on or be canceled.
      boolean isCanceled​(java.lang.String bladeId)
      Called an arbitrarily number of times at arbitrary moments during a collect to ensure the collect must go on or be canceled for the given blade.
      void progress​(java.lang.String bladeId, long done)
      Called an arbitrary number of times when collecting test results from a blade to give current progress
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fullsize

        protected long fullsize
      • bladesize

        protected long bladesize
      • progress

        protected long progress
    • Constructor Detail

      • TextCollectMonitor

        public TextCollectMonitor()
    • Method Detail

      • collectStart

        public void collectStart​(java.lang.String testId,
                                 long size)
        Description copied from interface: CollectListener
        Called at the collect beginning.
        Specified by:
        collectStart in interface CollectListener
        Parameters:
        testId - the identifier of the test to be collected
        size - the total number of bytes to be collected
      • bladeCollectStart

        public void bladeCollectStart​(java.lang.String bladeId,
                                      long size)
        Description copied from interface: CollectListener
        Called before collecting test results from a blade.
        Specified by:
        bladeCollectStart in interface CollectListener
        Parameters:
        bladeId - the identifier of the blade about to be collected
        size - the total number of bytes to collect from the given blade
      • progress

        public void progress​(java.lang.String bladeId,
                             long done)
        Description copied from interface: CollectListener
        Called an arbitrary number of times when collecting test results from a blade to give current progress
        Specified by:
        progress in interface CollectListener
        Parameters:
        bladeId - the identifier of the blade test results are being collected from
        done - number of bytes already collected (cannot decrease, nor be greater then the size given in the preliminary bladeCollectStart call)
      • done

        public void done()
        Description copied from interface: CollectListener
        Called when the full collect is complete.
        Specified by:
        done in interface CollectListener
      • isCanceled

        public boolean isCanceled()
        Description copied from interface: CollectListener
        Called an arbitrarily number of times at arbitrary moments during a collect to ensure the collect must go on or be canceled.
        Specified by:
        isCanceled in interface CollectListener
        Returns:
        true if the full collect must be canceled, false to go on.
      • isCanceled

        public boolean isCanceled​(java.lang.String bladeId)
        Description copied from interface: CollectListener
        Called an arbitrarily number of times at arbitrary moments during a collect to ensure the collect must go on or be canceled for the given blade.
        Specified by:
        isCanceled in interface CollectListener
        Parameters:
        bladeId - the identifier of the considered blade
        Returns:
        true if the full collect must be canceled for the given blade, false to go on.