T - The return typepublic final class GenericProgressTask<T> extends Object implements Callable<T>, ProgressTask
ProgressTask that also implements the
Callable interface, and delegates its work to another
Callable.| Constructor and Description |
|---|
GenericProgressTask(String description)
Creates a new task with the given description.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProgressListener(ProgressListener progressListener)
Add the given
ProgressListener to be informed about
changes in this task. |
T |
call() |
String |
getDescription()
Returns the description of this task.
|
ProgressListener |
getDispatchingProgressListener()
Returns a
ProgressListener that may be informed about
changes in the progress of the callable that was given to this
task. |
void |
removeProgressListener(ProgressListener progressListener)
Remove the given
ProgressListener to no longer be informed
about changes in this task. |
void |
setCallable(Callable<T> callable)
Set the callable that should be executed by this task
|
String |
toString() |
public GenericProgressTask(String description)
setCallable(Callable). If no callable is set, then
this task simply returns null.description - The descriptionpublic void setCallable(Callable<T> callable)
callable - The callablepublic ProgressListener getDispatchingProgressListener()
ProgressListener that may be informed about
changes in the progress of the callable that was given to this
task. It will forward all progress changes to the
ProgressListeners that have been registered for
this task.ProgressListenerpublic String getDescription()
ProgressTaskgetDescription in interface ProgressTaskpublic void addProgressListener(ProgressListener progressListener)
ProgressTaskProgressListener to be informed about
changes in this task.addProgressListener in interface ProgressTaskprogressListener - The ProgressListener to addpublic void removeProgressListener(ProgressListener progressListener)
ProgressTaskProgressListener to no longer be informed
about changes in this task.removeProgressListener in interface ProgressTaskprogressListener - The ProgressListener to removeCopyright © 2016. All rights reserved.