Interface ProgressWorker.ProgressResultTask<T,V>

Type Parameters:
T - the task result type
V - the intermediate result type
All Known Subinterfaces:
ProgressWorker.ProgressResultTaskHandler<T,V>
Enclosing class:
ProgressWorker<T,V>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ProgressWorker.ProgressResultTask<T,V>
A progress aware background task producing a result.
  • Method Details

    • execute

      T execute(ProgressWorker.ProgressReporter<V> progress) throws Exception
      Executes the task.
      Parameters:
      progress - the progress reporter for reporting progress (0 - maximum()) or publishing an intermediate result or message.
      Returns:
      the task result
      Throws:
      Exception - in case of an exception
    • maximum

      default int maximum()
      Returns:
      the maximum progress this task will report