www.sdmetrics.com

sdmetrics.app
Interface SDMessageHandler


public interface SDMessageHandler

Interface defining callback methods used to output messages about metrics calculation progress and errors, and notify the caller when calculation has completed.


Method Summary
 void error(java.lang.String s)
          Callback method to notify calling object that processing could not be completed successfully.
 void finishedComputation()
          Callback method to notify calling object when processing is complete, and the metric data etc may be obtained from the controller object.
 void message(java.lang.String s, int progress)
          Callback method to report calculation progress messages to the user.
 

Method Detail

message

public void message(java.lang.String s,
                    int progress)
Callback method to report calculation progress messages to the user.

Parameters:
s - A string describing the calculation currently being performed. If s is null, the currently shown message remains the same, only the progress is to be updated.
progress - Integer between 0 and 100 indicating the progress (100=finished). If progress is negative, the currently shown progress remains the same, only the messsage is to be updated.

error

public void error(java.lang.String s)
Callback method to notify calling object that processing could not be completed successfully.

Parameters:
s - A string describing the error that occured.

finishedComputation

public void finishedComputation()
Callback method to notify calling object when processing is complete, and the metric data etc may be obtained from the controller object. This method is useful if the metrics calculation is performed asynchronously in a separate thread (e.g., using a CalcRunner to maintain a responsive GUI).


www.sdmetrics.com