public interface CancelTask
Modifier and Type | Method and Description |
---|---|
static CancelTask |
create() |
boolean |
isCancel()
Calling routine may cancel, called routine checks this method, and if true, return asap.
|
boolean |
isDone()
Application calls to see if task is done.
|
void |
setDone(boolean done)
Called routine sets operation was completed.
|
void |
setError(String msg)
Called routine got an error, so it sets a message for calling program to show to user.
|
void |
setProgress(String msg,
int progress)
Called routine may optionally show a progress message for calling program to show to user.
|
default void |
setSuccess()
Called routine sets whether operation successfully completed.
|
static CancelTask create()
boolean isCancel()
boolean isDone()
void setDone(boolean done)
void setError(String msg)
msg
- message to show uservoid setProgress(String msg, int progress)
msg
- message to show userprogress
- count of progressdefault void setSuccess()