Interface ProgressTask<T>

Type Parameters:
T - The return type of the task. Use Void if it does not return a value.

public interface ProgressTask<T>
A named task which may report its progress and may return a value.
  • Method Summary

    Modifier and Type
    Method
    Description
    execute(org.pepsoft.util.ProgressReceiver progressReceiver)
    Perform the task, optionally reporting progress to a progress receiver and optionally returning a value.
    Get the short descriptive name of the task.
  • Method Details

    • getName

      String getName()
      Get the short descriptive name of the task.
      Returns:
      The name of the task.
    • execute

      T execute(org.pepsoft.util.ProgressReceiver progressReceiver) throws org.pepsoft.util.ProgressReceiver.OperationCancelled
      Perform the task, optionally reporting progress to a progress receiver and optionally returning a value.
      Parameters:
      progressReceiver - The progress receiver to which to report progress. May be null.
      Returns:
      The result of the task, or null if it does not return a result.
      Throws:
      org.pepsoft.util.ProgressReceiver.OperationCancelled - If the user cancelled the operation, as indicated by the progress receiver throwing an OperationCancelled exception.