Package org

Interface BackgroundTaskStatusProvider

All Known Subinterfaces:
BackgroundTaskStatusProvider, BackgroundTaskStatusProviderSupportingExternalCall
All Known Implementing Classes:
AllSuperGraphsCreator, BackgroundTaskConsoleLogger, BackgroundTaskStatusProviderSupportingExternalCallImpl, DBEinputFileReader, EnzymeService, Experiment2GraphHelper, ExperimentDataFileReader, GeneExpressionFileReader, HammingCalculator, KeggService, KeggSoapAndPathwayService, MyClusterGraphBasedReLayoutService, MyCorrlationFinder, MyNonInteractiveSpringEmb, PDFAlgorithm, ReactionService, SOMservice, TabKegg, TranspathService

public interface BackgroundTaskStatusProvider
Author:
klukas
  • Method Summary

    Modifier and Type Method Description
    String getCurrentStatusMessage1()
    Returns a status message on what is going on.
    String getCurrentStatusMessage2()
    Returns a status message on what is going on.
    int getCurrentStatusValue()
    Returns the completion status.
    double getCurrentStatusValueFine()
    Same as getCurrentStatusValue(), but this method should return a finer granted progress value.
    void pleaseContinueRun()
    This method is called as soon as the user indicates that he is comfortable to let the algorithm continue its work.
    void pleaseStop()
    If this method is called on the status provider, the linked work task should stop its execution as soon as possible.
    boolean pluginWaitsForUser()  
    void setCurrentStatusValue​(int value)
    Override this method and pass a implementor of this interface to any other service method.
  • Method Details

    • getCurrentStatusValue

      int getCurrentStatusValue()
      Returns the completion status. WARNING: This method must be Thread-Safe!
      Returns:
      A number from 0..100 which represents the completion status. If -1 is returned, the progress bar is set to "indeterminate", which means, that the progress bar will float from left to right and reverse. (Useful if status can not be determined) Other values let the progressbar disappear.
    • setCurrentStatusValue

      void setCurrentStatusValue​(int value)
      Override this method and pass a implementor of this interface to any other service method. This method can use this call to update the status value.
      Parameters:
      value -
    • getCurrentStatusValueFine

      double getCurrentStatusValueFine()
      Same as getCurrentStatusValue(), but this method should return a finer granted progress value. If this is not needed, the code for getCurrentStatusValue() could be reused by the client.
      Returns:
      The current progress value (fine).
    • getCurrentStatusMessage1

      String getCurrentStatusMessage1()
      Returns a status message on what is going on. WARNING: This method must be Thread-Safe!
      Returns:
      A status message, or null if not needed.
    • getCurrentStatusMessage2

      String getCurrentStatusMessage2()
      Returns a status message on what is going on. Is used the same like getCurrentStatusMessage1. This second message adds flexibility. If not needed, the first message should be used and this should return null if not needed. WARNING: This method must be Thread-Safe!
      Returns:
      A status message, or null if not needed.
    • pleaseStop

      void pleaseStop()
      If this method is called on the status provider, the linked work task should stop its execution as soon as possible.
    • pluginWaitsForUser

      boolean pluginWaitsForUser()
      Returns:
      Let this method return true in order to show a "Continue" button in the GUI. When this buttons is clicked, the method pleaseContinueRun is called. Use these two methods to let the user interact with the GUI while the algorithm is waiting for the user to be ready for the continued work of the algorithm.
    • pleaseContinueRun

      void pleaseContinueRun()
      This method is called as soon as the user indicates that he is comfortable to let the algorithm continue its work.