public class WriterTaskMonitor<C extends ApplicationContext> extends AbstractTaskMonitor<C>
Constructor and Description |
---|
WriterTaskMonitor(C ctx,
AsyncTask task,
java.io.File targetDir) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeFile() |
protected java.lang.String |
createOutputFileName(TaskId taskId) |
java.io.File |
getOutFile() |
protected java.io.PrintStream |
getWriter() |
protected void |
openFile() |
protected void |
printRunState(RunStateFlag state) |
void |
taskCancelled(RunStateFlag stateFlag)
Called when the async task has discovered that it was cancelled
|
void |
taskChildFinished(RunStateFlag stateFlag)
Indicates that a child task has been finished.
|
void |
taskChildStarted(RunStateFlag stateFlag)
Indicates that a child task has been started.
|
void |
taskChildSucceeded(RunStateFlag stateFlag,
java.lang.Object result)
Indicates that a child task has been succeeded with the given result.
|
void |
taskFailed(RunStateFlag stateFlag,
java.lang.Exception error)
Called when the async task failed
|
void |
taskFinished(RunStateFlag stateFlag)
Called when the async task finished
|
void |
taskProceeded(RunStateFlag stateFlag,
java.lang.Object result,
int step,
int maxSteps,
java.lang.String message)
Is called on task progress.
|
void |
taskStarted(RunStateFlag stateFlag)
Called when the async task started
|
void |
taskSucceeded(RunStateFlag stateFlag,
java.lang.Object result)
Called when the async task succeeded
|
accept
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getApplicationContext
public java.io.File getOutFile()
public void taskStarted(RunStateFlag stateFlag) throws java.lang.Exception
TaskMonitor
java.lang.Exception
public void taskProceeded(RunStateFlag stateFlag, java.lang.Object result, int step, int maxSteps, java.lang.String message) throws java.lang.Exception
TaskMonitor
result
- may be anything the running task has produced (i.e. a DBRecord)step
- the number of steps performedmaxSteps
- the maximum number of steps expected (0 if not known)java.lang.Exception
public void taskSucceeded(RunStateFlag stateFlag, java.lang.Object result)
TaskMonitor
public void taskCancelled(RunStateFlag stateFlag)
TaskMonitor
public void taskFailed(RunStateFlag stateFlag, java.lang.Exception error)
TaskMonitor
public void taskChildStarted(RunStateFlag stateFlag)
TaskMonitor
RunStateFlag.getCurrentChild()
;public void taskChildSucceeded(RunStateFlag stateFlag, java.lang.Object result)
TaskMonitor
public void taskChildFinished(RunStateFlag stateFlag)
TaskMonitor
public void taskFinished(RunStateFlag stateFlag)
TaskMonitor
protected void openFile() throws java.io.FileNotFoundException
java.io.FileNotFoundException
protected void closeFile()
protected void printRunState(RunStateFlag state)
protected java.io.PrintStream getWriter()
protected java.lang.String createOutputFileName(TaskId taskId)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.