|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.schemedit.threadedservices.TaskProgress
public class TaskProgress
Class to report progress of a 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.
| Field Summary | |
|---|---|
protected static boolean |
debug
|
| Constructor Summary | |
|---|---|
TaskProgress(MonitoredTask task)
Constructor for the TaskProgress object |
|
| Method Summary | |
|---|---|
int |
getDone()
Gets the done attribute of the TaskProgress object |
boolean |
getError()
Gets the error attribute of the TaskProgress object |
String |
getMsg()
Gets the msg attribute of the TaskProgress object |
float |
getPercentComplete()
Percentage of task completed |
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,
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(String msg)
Sets the msg attribute of the TaskProgress object |
void |
setTotal(int total)
Sets the total attribute of the TaskProgress object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static boolean debug
| Constructor Detail |
|---|
public TaskProgress(MonitoredTask task)
task - the task for which we report progress| Method Detail |
|---|
public void init(int total)
total - number of items to be processed
public void init(int total,
String msg)
total - number of items to be processedmsg - message used in reportingpublic boolean isActive()
public String getMsg()
public void setMsg(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 String getProgressReport()
public void reset()
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||