Class TextProgressReceiver

java.lang.Object
org.pepsoft.util.TextProgressReceiver
All Implemented Interfaces:
ProgressReceiver

public class TextProgressReceiver extends Object implements ProgressReceiver
A simple text-based progress received which prints a bar of fifty dots.
  • Constructor Details

    • TextProgressReceiver

      public TextProgressReceiver()
  • Method Details

    • setProgress

      public void setProgress(float progressFraction)
      Description copied from interface: ProgressReceiver
      Set the progress as a value from 0.0f to 1.0f (inclusive).
      Specified by:
      setProgress in interface ProgressReceiver
      Parameters:
      progressFraction - The progress to report.
    • exceptionThrown

      public void exceptionThrown(Throwable exception)
      Description copied from interface: ProgressReceiver
      Report that the operation has been aborted due to an exception having been thrown. Any other threads working on the same operation will be canceled.
      Specified by:
      exceptionThrown in interface ProgressReceiver
      Parameters:
      exception - The exception which has been thrown.
    • reset

      public void reset()
      Description copied from interface: ProgressReceiver
      Restart the progress bar. All progress will be wiped out and the next expected progress report will be expected to be as if progress started from 0.0f again.
      Specified by:
      reset in interface ProgressReceiver
    • done

      public void done()
      Description copied from interface: ProgressReceiver
      Report that the operation has succeeded successfully.
      Specified by:
      done in interface ProgressReceiver
    • setMessage

      public void setMessage(String message)
      Description copied from interface: ProgressReceiver
      Change the message describing the current operation.
      Specified by:
      setMessage in interface ProgressReceiver
      Parameters:
      message - A message describing the current operation.
    • checkForCancellation

      public void checkForCancellation()
      Description copied from interface: ProgressReceiver
      Check whether the operation has been canceled. An OperationCancelled exception will be thrown if it has.
      Specified by:
      checkForCancellation in interface ProgressReceiver
    • subProgressStarted

      public void subProgressStarted(SubProgressReceiver subProgressReceiver)
      Description copied from interface: ProgressReceiver
      Invoked when a subordinate SubProgressReceiver is started, reporting to this progress receiver.
      Specified by:
      subProgressStarted in interface ProgressReceiver
      Parameters:
      subProgressReceiver - The sub progress receiver which has been started.