public class CliTaskMonitor extends java.lang.Object implements IServerTaskMonitor
Constructor and Description |
---|
CliTaskMonitor() |
CliTaskMonitor(java.lang.String logPrefix) |
Modifier and Type | Method and Description |
---|---|
protected org.fusesource.jansi.Ansi |
ansi() |
void |
begin(double totalWork,
java.lang.String log)
Notifies that the task is beginning.
|
void |
end(boolean success,
java.lang.String log,
java.lang.String result)
Notifies that the task has been completed.
|
void |
log(java.lang.String log) |
void |
progress(double doneWork,
java.lang.String log)
Notifies that a given number of work unit of the task has been completed.
|
void |
progress(int total,
int current) |
IServerTaskMonitor |
subWork(double work) |
IServerTaskMonitor |
subWork(java.lang.String logPrefix,
double work)
Create a sub task monitor that uses a given amount of work unit from the task
|
public CliTaskMonitor()
public CliTaskMonitor(java.lang.String logPrefix)
protected org.fusesource.jansi.Ansi ansi()
public IServerTaskMonitor subWork(double work)
subWork
in interface IServerTaskMonitor
IServerTaskMonitor.subWork(String, double)
public IServerTaskMonitor subWork(java.lang.String logPrefix, double work)
IServerTaskMonitor
subWork
in interface IServerTaskMonitor
work
- the total number of work units given to the sub task monitor
task.public void begin(double totalWork, java.lang.String log)
IServerTaskMonitor
begin
in interface IServerTaskMonitor
totalWork
- the total number of work units into which the task is been
subdivided.public void progress(double doneWork, java.lang.String log)
IServerTaskMonitor
progress
in interface IServerTaskMonitor
doneWork
- number of work units just completedpublic void progress(int total, int current)
public void end(boolean success, java.lang.String log, java.lang.String result)
IServerTaskMonitor
end
in interface IServerTaskMonitor
public void log(java.lang.String log)
log
in interface IServerTaskMonitor
Copyright © 2021. All Rights Reserved.