org.ow2.clif.storage.api
Interface CollectListener

All Known Implementing Classes:
CollectProgressDialog, GuiCollectDialog, TextCollectMonitor

public interface CollectListener

This interface is dedicated to monitoring the progress of test results/data collection. The client contract is the following:

Author:
Bruno Dillenseger

Method Summary
 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
 

Method Detail

collectStart

void collectStart(java.lang.String testId,
                  long size)
Called at the collect beginning.

Parameters:
testId - the identifier of the test to be collected
size - the total number of bytes to be collected

bladeCollectStart

void bladeCollectStart(java.lang.String bladeId,
                       long size)
Called before collecting test results from a blade.

Parameters:
bladeId - the identifier of the blade about to be collected
size - the total number of bytes to collect from the given blade

progress

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

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

void done()
Called when the full collect is complete.


isCanceled

boolean isCanceled()
Called an arbitrarily number of times at arbitrary moments during a collect to ensure the collect must go on or be canceled.

Returns:
true if the full collect must be canceled, false to go on.

isCanceled

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.

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.