public class DefaultTaskMonitor<C extends ApplicationContext> extends AbstractTaskMonitor<C>
TaskMonitor
template with empty default implementations.
You may override methods as needed. Be aware that all methods in this monitor
are called async by the Thread that runs the underlying task.Constructor and Description |
---|
DefaultTaskMonitor(C ctx) |
DefaultTaskMonitor(C ctx,
LogChannel logCh) |
Modifier and Type | Method and Description |
---|---|
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 obj,
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 DefaultTaskMonitor(C ctx, LogChannel logCh)
public DefaultTaskMonitor(C ctx)
public void taskStarted(RunStateFlag stateFlag) throws java.lang.Exception
TaskMonitor
java.lang.Exception
public void taskProceeded(RunStateFlag stateFlag, java.lang.Object obj, int step, int maxSteps, java.lang.String message) throws java.lang.Exception
TaskMonitor
obj
- 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 taskCancelled(RunStateFlag stateFlag)
TaskMonitor
public void taskFailed(RunStateFlag stateFlag, java.lang.Exception error)
TaskMonitor
public void taskSucceeded(RunStateFlag stateFlag, java.lang.Object result)
TaskMonitor
public void taskFinished(RunStateFlag stateFlag)
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
Copyright © 2014 EsprIT-Systems. All Rights Reserved.