public class TaskMonitorList extends AbstractTaskMonitor
TaskMonitor
implementation that actually manages a list of TaskMonitor
s.
This class makes it possible to attach multiple TaskMonitor
s to a single
AsyncTask
. It forwards all notifications to all containing instances.Constructor and Description |
---|
TaskMonitorList(ApplicationContext ctx) |
TaskMonitorList(ApplicationContext ctx,
LogChannel logCh) |
Modifier and Type | Method and Description |
---|---|
void |
addMonitor(TaskMonitor monitor) |
void |
clearMonitors() |
int |
getMonitorCount() |
TaskMonitor[] |
getMonitors() |
boolean |
hasMonitor() |
void |
removeMonitor(TaskMonitor monitor) |
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 TaskMonitorList(ApplicationContext ctx)
public TaskMonitorList(ApplicationContext ctx, LogChannel logCh)
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 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
public void addMonitor(TaskMonitor monitor)
public void removeMonitor(TaskMonitor monitor)
public void clearMonitors()
public TaskMonitor[] getMonitors()
public int getMonitorCount()
public boolean hasMonitor()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.