public interface BackgroundTask
BackgroundTask
is an interface that describes the operations available for checking on the status of a running task. There are methods available for checking if the task is finished, if the task was successfully completed, and for cancelling the task. Query implementations may extend this interface to provide an interface method for fetching the resultant query data.Modifier and Type | Method and Description |
---|---|
void |
cancel()
Attempts to cancel the current task in progress.
|
int |
getProgress()
Fetches the current progress of the query task.
|
java.lang.String |
getProgressText()
Fetches a human-readable (translated) descriptive text that describes what the task is currently doing.
|
boolean |
isFinished()
Fetch whether this task is completed or not.
|
void |
waitUntilFinished()
Waits until the task is finished (i.e., isFinished() returns true).
|
boolean isFinished()
void waitUntilFinished()
void cancel()
int getProgress()
java.lang.String getProgressText()