public class TaskProgress
extends java.lang.Object
MonitoredTask via a json object.The monitoredTask updates the TaskProgress object as it runs, and the TaskProgress can also query the Task for other properties, such as whether the task is actually running.
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
debug |
| Constructor and Description |
|---|
TaskProgress(MonitoredTask task)
Constructor for the TaskProgress object
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDone()
Gets the done attribute of the TaskProgress object
|
boolean |
getError()
Gets the error attribute of the TaskProgress object
|
java.lang.String |
getMsg()
Gets the msg attribute of the TaskProgress object
|
float |
getPercentComplete()
Percentage of task completed
|
java.lang.String |
getProgressReport()
Reports the current progress as a JSON string
|
int |
getTotal()
Gets the total attribute of the TaskProgress object
|
void |
init(int total)
Initialize with total items to be processed
|
void |
init(int total,
java.lang.String msg)
Initialize with total items to be processed and a message that is part of
progress reports
|
boolean |
isActive()
Reports whether this TaskProgress' task is processing.
|
void |
reset()
NOT YET DOCUMENTED
|
void |
setDone(int done)
Sets the done attribute of the TaskProgress object
|
void |
setError(boolean error)
Sets the error attribute of the TaskProgress object
|
void |
setMsg(java.lang.String msg)
Sets the msg attribute of the TaskProgress object
|
void |
setTotal(int total)
Sets the total attribute of the TaskProgress object
|
public TaskProgress(MonitoredTask task)
task - the task for which we report progresspublic void init(int total)
total - number of items to be processedpublic void init(int total,
java.lang.String msg)
total - number of items to be processedmsg - message used in reportingpublic boolean isActive()
public java.lang.String getMsg()
public void setMsg(java.lang.String msg)
msg - The new msg valuepublic int getDone()
public void setDone(int done)
done - The new done valuepublic int getTotal()
public void setTotal(int total)
total - The new total valuepublic boolean getError()
public void setError(boolean error)
error - The new error valuepublic float getPercentComplete()
Can be calculated by client!?
public java.lang.String getProgressReport()
public void reset()