public class LoggingExecutionMonitor extends PhaseMonitor
ExecutionMonitor using default logger.PhaseMonitor.JobStatusNULL| Constructor and Description |
|---|
LoggingExecutionMonitor(ExecutionContext context,
double stepUnit)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Ends the current task and notify this event to the corresponding receiver.
|
protected void |
onJobMonitorClosed(String jobId)
Notifies the job was closed.
|
protected void |
onJobMonitorOpened(String jobId)
Notifies the job was opened.
|
void |
open(double taskSize)
Begins a task and notify this event to the corresponding receiver.
|
void |
progressed(double deltaSize)
Progresses the current task and notify this event to the corresponding receiver.
|
void |
reportJobStatus(String jobId,
PhaseMonitor.JobStatus status,
Throwable cause)
Reports job status about target job ID.
|
void |
setProgress(double workedSize)
Sets the progress of current task and notify this event to the corresponding receiver.
|
checkCancelled, createJobMonitor, getJobOutput, getOutput, isCancelRequestedpublic LoggingExecutionMonitor(ExecutionContext context, double stepUnit)
context - current contextstepUnit - report unit for each progress size (0.0~1.0)IllegalArgumentException - if some parameters were nullpublic void open(double taskSize)
ExecutionMonitortaskSize - the total task sizepublic void progressed(double deltaSize)
ExecutionMonitordeltaSize - the difference of progressed task sizepublic void setProgress(double workedSize)
ExecutionMonitorworkedSize - the absolute progressed task sizeprotected void onJobMonitorOpened(String jobId)
PhaseMonitoronJobMonitorOpened in class PhaseMonitorjobId - target job IDprotected void onJobMonitorClosed(String jobId)
PhaseMonitoronJobMonitorClosed in class PhaseMonitorjobId - target job IDpublic void reportJobStatus(String jobId, PhaseMonitor.JobStatus status, Throwable cause) throws IOException
PhaseMonitorreportJobStatus in class PhaseMonitorjobId - target job IDstatus - the job statuscause - occurred exception (nullable)IOException - if failed to notify this eventpublic void close()
ExecutionMonitorCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.