public class ClientCommandTask<C extends ClientContext> extends AbstractSwingTask<C> implements ClientObject<C>
childTaskRef, isTestMode, monitorController, resultRef, stateFlag| Constructor and Description |
|---|
ClientCommandTask(C clientCtx,
ClientCommand cmd) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
This is special: Because the command may be queued but not running yet
it will never react after a cancel neither will it ever run.
|
protected void |
doneTaskFinished()
Ensure it is removed from the running commands list after execution
|
protected void |
doneTaskStarted(TaskEvent e)
Enforces a repaint of the list in order to render the just started command as running
|
void |
executeAsync()
Must be overridden to perform the async part.
|
ClientCommand |
getClientCommand() |
C |
getClientContext()
Returns the the client runtime environment
|
java.lang.String |
getCommandId() |
java.awt.Color |
getRenderColor()
Overridden to render queued commands in gray
|
javax.swing.Icon |
getRenderIcon() |
DumpString |
toDumpString(DumpString s)
This method allows subclasses to add values to the existing DumpString of the superclass.
|
ToString |
toString(ToString s)
This method allows subclasses to add values to the existing ToString of the superclass.
|
addMonitor, addTaskListener, awaitEventsDone, doneChildFinished, doneChildStarted, doneTaskCancelled, doneTaskFailed, doneTaskFinished, doneTaskProceeded, doneTaskStateChanged, doneTaskSucceeded, getActionCancel, getRenderText, getSwingTaskMonitor, isRegisterInTaskList, removeTaskListener, showError, showError, showError, showInfo, showInfo, showWarning, showWarningawaitFinished, awaitFinished, awaitStarted, 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, wasSucceededcheckCancelled, 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, wasCancelledgetApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepCheckedgetApplicationContextexecuteclearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitorgetLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelwasCancelledgetTaskIdtoDumpString, toStringpublic ClientCommandTask(C clientCtx, ClientCommand cmd)
public final C getClientContext()
ClientObjectgetClientContext in interface ClientObject<C extends ClientContext>public java.lang.String getCommandId()
public ClientCommand getClientCommand()
public void executeAsync()
throws java.lang.Exception
AbstractAsyncTaskAbstractAsyncTask.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 ClientContext>executeAsync in class AbstractAsyncTask<C extends ClientContext>java.lang.Exceptionfor synchronous executionpublic void cancel()
cancel in interface LocalCancellableTaskcancel in class AbstractAsyncTask<C extends ClientContext>protected void doneTaskStarted(TaskEvent e)
doneTaskStarted in class AbstractSwingTask<C extends ClientContext>protected void doneTaskFinished()
public javax.swing.Icon getRenderIcon()
getRenderIcon in interface RenderablegetRenderIcon in class AbstractSwingTask<C extends ClientContext>public java.awt.Color getRenderColor()
getRenderColor in interface RenderablegetRenderColor in class AbstractSwingTask<C extends ClientContext>public ToString toString(ToString s)
DumpabletoString in interface DumpabletoString in class AbstractAsyncTask<C extends ClientContext>public DumpString toDumpString(DumpString s)
DumpabletoDumpString in interface DumpabletoDumpString in class DumpableObjectCopyright © 2014 EsprIT-Systems. All Rights Reserved.