Package org.pepsoft.util.swing
Interface ProgressTask<T>
- Type Parameters:
T- The return type of the task. UseVoidif 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
-
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 benull.- Returns:
- The result of the task, or
nullif 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 anOperationCancelledexception.
-