|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lgc.wsh.util.LogMonitor
public class LogMonitor
Report progress to default Logger
| Field Summary |
|---|
| Fields inherited from interface com.lgc.wsh.util.Monitor |
|---|
NULL_MONITOR |
| Constructor Summary | |
|---|---|
LogMonitor(java.lang.String prefix,
java.util.logging.Logger logger)
Progress will be reported to this Logger. |
|
| Method Summary | |
|---|---|
static java.lang.String |
getProgressReport(long startTime,
long currentTime,
double fraction,
double initFraction)
Get a user-viewable String describing the progress and completion time. |
void |
initReport(double initFraction)
Initialize the fraction of the work that was completed when the process started. |
static void |
main(java.lang.String[] argv)
run tests |
void |
report(double fraction)
This method will be called with the current fraction of work done. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogMonitor(java.lang.String prefix,
java.util.logging.Logger logger)
prefix - Prefix this string to every report.logger - Send to this Logger. If null,
then check arguments but do nothing.| Method Detail |
|---|
public void initReport(double initFraction)
Monitor
initReport in interface MonitorinitFraction - Fraction of work done when
process started, from 0 to 1.public void report(double fraction)
Monitor
report in interface Monitorfraction - Fraction of work done so far, from 0 to 1.
This value must equal or exceed all values previously
passed to this method or to initReport.
public static java.lang.String getProgressReport(long startTime,
long currentTime,
double fraction,
double initFraction)
startTime - Time in milliseconds when work began.currentTime - Current time in milliseconds.fraction - Current fraction of total progress, between 0 and 1.initFraction - Initial fraction of total progress, between 0 and 1,
when work started.
public static void main(java.lang.String[] argv)
throws java.lang.Exception
argv - command line
java.lang.Exception - test failures
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||