public class LoggingExecutionMonitor extends PhaseMonitor
ExecutionMonitor
using default logger.PhaseMonitor.JobStatus
NULL
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, isCancelRequested
public LoggingExecutionMonitor(ExecutionContext context, double stepUnit)
context
- current contextstepUnit
- report unit for each progress size (0.0~1.0)IllegalArgumentException
- if some parameters were null
public void open(double taskSize)
ExecutionMonitor
taskSize
- the total task sizepublic void progressed(double deltaSize)
ExecutionMonitor
deltaSize
- the difference of progressed task sizepublic void setProgress(double workedSize)
ExecutionMonitor
workedSize
- the absolute progressed task sizeprotected void onJobMonitorOpened(String jobId)
PhaseMonitor
onJobMonitorOpened
in class PhaseMonitor
jobId
- target job IDprotected void onJobMonitorClosed(String jobId)
PhaseMonitor
onJobMonitorClosed
in class PhaseMonitor
jobId
- target job IDpublic void reportJobStatus(String jobId, PhaseMonitor.JobStatus status, Throwable cause) throws IOException
PhaseMonitor
reportJobStatus
in class PhaseMonitor
jobId
- target job IDstatus
- the job statuscause
- occurred exception (nullable)IOException
- if failed to notify this eventpublic void close()
ExecutionMonitor
Copyright © 2011–2019 Asakusa Framework Team. All rights reserved.