public class JobMonitor extends Object implements ExecutionMonitor
NULL| Constructor and Description |
|---|
JobMonitor(PhaseMonitor parent,
String jobId,
double taskSizeInParent)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkCancelled()
Raise
InterruptedException if cancel has been requested. |
void |
close()
Ends the current task and notify this event to the corresponding receiver.
|
OutputStream |
getOutput()
Returns output stream for extra information.
|
void |
open(double taskSize)
Begins a task and notify this event to the corresponding receiver.
|
void |
progressed(double size)
Progresses the current task and notify this event to the corresponding receiver.
|
void |
setProgress(double workedSize)
Sets the progress of current task and notify this event to the corresponding receiver.
|
public JobMonitor(PhaseMonitor parent, String jobId, double taskSizeInParent)
parent - the parent monitorjobId - target job IDtaskSizeInParent - total task size in the parent for this monitorIllegalArgumentException - if parent is nullpublic void checkCancelled()
throws InterruptedException
ExecutionMonitorInterruptedException if cancel has been requested.checkCancelled in interface ExecutionMonitorInterruptedException - if cencel requestedpublic void open(double taskSize)
throws IOException
open in interface ExecutionMonitortaskSize - the total task sizeIOException - if failed to notify this eventIllegalArgumentException - if some parameters were nullpublic void progressed(double size)
throws IOException
ExecutionMonitorprogressed in interface ExecutionMonitorsize - the difference of progressed task sizeIOException - if failed to notify this eventpublic void setProgress(double workedSize)
throws IOException
ExecutionMonitorsetProgress in interface ExecutionMonitorworkedSize - the absolute progressed task sizeIOException - if failed to notify this eventpublic OutputStream getOutput() throws IOException
ExecutionMonitorgetOutput in interface ExecutionMonitorIOException - if failed to prepare the outputpublic void close()
throws IOException
ExecutionMonitorclose in interface ExecutionMonitorclose in interface Closeableclose in interface AutoCloseableIOException - if failed to notify this eventCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.