public interface ExecutionMonitor extends Closeable
Modifier and Type | Field and Description |
---|---|
static ExecutionMonitor |
NULL
An empty implementation.
|
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 deltaSize)
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.
|
static final ExecutionMonitor NULL
void open(double taskSize) throws IOException
taskSize
- the total task sizeIOException
- if failed to notify this eventIllegalArgumentException
- if some parameters were null
void checkCancelled() throws InterruptedException
InterruptedException
if cancel has been requested.InterruptedException
- if cencel requestedvoid progressed(double deltaSize) throws IOException
deltaSize
- the difference of progressed task sizeIOException
- if failed to notify this eventIllegalArgumentException
- if some parameters were null
void setProgress(double workedSize) throws IOException
workedSize
- the absolute progressed task sizeIOException
- if failed to notify this eventIllegalArgumentException
- if some parameters were null
OutputStream getOutput() throws IOException
IOException
- if failed to prepare the outputvoid close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
IOException
- if failed to notify this eventCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.