public class TaskCollection<C extends ApplicationContext> extends AbstractAsyncTask<C> implements Clearable
AsyncExecutable
s as sub-tasks in a serie.
For each sub-tasks it notifies its monitors with CHILD_STARTED/CHILD_FINISHED calls. That
way it is able to drive a double progressBar.childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
TaskCollection(C ctx) |
TaskCollection(C ctx,
java.lang.String collTaskName) |
Modifier and Type | Method and Description |
---|---|
void |
addTask(AsyncExecutable task)
Add a sub-task to be executed
|
void |
clear()
Removes all sub-tasks from the execution list
|
void |
executeAsync()
Must be overridden to perform the async part.
|
AsyncExecutable |
getTask(int index) |
void |
insertTask(int index,
AsyncExecutable task)
Add a sub-task to be executed at a particular index
|
void |
removeTask(AsyncExecutable task)
Remove the given sub-task from the execution list
|
void |
removeTask(int index)
Remove the sub-task at the given index from the execution list
|
awaitFinished, awaitFinished, awaitStarted, cancel, createTaskId, deregisterTask, doOnFinish, doOnStart, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submit, submit, submitInternal, toString, wasSucceeded
addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, createRunStateFlag, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, hasError, hasMonitor, isCancellable, registerTaskStateChange, removeMonitor, resetProgress, setCancellable, setLogLevel, setMaxProgressSteps, setMonitor, setName, setName, setResult, setRunStateFlag, setTaskId, setType, shouldFireMonitor, sleepChecked, wasCancelled
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepChecked
getApplicationContext
execute
addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
wasCancelled
getTaskId
toDumpString, toDumpString, toString
public TaskCollection(C ctx)
public TaskCollection(C ctx, java.lang.String collTaskName)
public void executeAsync() throws java.lang.Exception
AbstractAsyncTask
AbstractAsyncTask.notifyProceeded(Object, int, int, String)
in order to notify
about task progress. Note: the running task should periodically call
AbstractAsyncExecutable.checkCancelled()
in order to detect cancellation.executeAsync
in interface AsyncExecutable<C extends ApplicationContext>
executeAsync
in class AbstractAsyncTask<C extends ApplicationContext>
java.lang.Exception
for synchronous execution
public void addTask(AsyncExecutable task)
public void insertTask(int index, AsyncExecutable task)
public void removeTask(AsyncExecutable task)
public void removeTask(int index)
public AsyncExecutable getTask(int index)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.