
//--------------------------------------------
/**
 * A task is something which may take some time and which
 * is not guaranteed to succeed. A set of tasks could be
 * managed by a TaskManager. An example of a task is
 * an attempt to download a file from a webserver.
 *
 *  @author matth3wbishop<at>yahoo<dot>com
 */ 

public interface Task
{

  //--------------------------------------------
  /* advises whether the attempted download was carried out successfully */
  public boolean wasSuccessful(); 

  //--------------------------------------------
  public void showProgress(boolean bShow);

  //--------------------------------------------
  /** try to do your job */
  public void doTask();

  //--------------------------------------------
  /* provides info about what happened while trying to do
   * the task */
  public String printReport();

  //--------------------------------------------
  /** a concise summary of what happened */
  public String toString();

} //-- Task interface
