public class RemoteJavaCommandTask<S extends ServerContext> extends AbstractRemoteOsProcessTask<S>
OUTPUT_TYPE_CONSOLE
childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Modifier | Constructor and Description |
---|---|
|
RemoteJavaCommandTask(S serverCtx,
JavaCommand cmd,
SessionId sessionId) |
|
RemoteJavaCommandTask(S serverCtx,
LogChannel logCh,
JavaCommand cmd,
SessionId sessionId) |
protected |
RemoteJavaCommandTask(S serverCtx,
LogChannel logCh,
java.lang.String taskName,
JavaCommand cmd,
SessionId sessionId) |
protected |
RemoteJavaCommandTask(S serverCtx,
SessionId sessionId) |
|
RemoteJavaCommandTask(S serverCtx,
java.lang.String taskName,
SessionId sessionId) |
Modifier and Type | Method and Description |
---|---|
void |
executeAsync()
Must be overridden to perform the async part.
|
JavaCommand |
getJavaCommand()
Returns the
JavaCommand that was created by setJavaCommand(JavaCommand) |
void |
setJavaCommand(JavaCommand cmd)
Only called when no
JavaCommand was passed via constructor |
cancel, createRunStateFlag, createTaskId, createTaskMonitor, doOnStart, getKillerSessionId, getOwnerSessionId, getRunStateFlag, getServerContext, getSessionId, getTaskId, setSessionId, submit, submit
cancel, checkExitStatus, createStandardInput, createStandardOutput, createStandardOutputFile, doOnConsoleOutput, doOnFileSystemChange, doOnFinish, getCommandBaseName, getCommandString, getProcessBuilder, getStandardOutputFile, getWorkingDir, isNotifyConsoleOutput, putEnv, setCommand, setNotifyConsoleOutput, setNotifyFileSystemChange, setStandardOutputFile, setWorkingDir, toDumpString
awaitFinished, awaitFinished, awaitStarted, deregisterTask, doOnSuccess, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submitInternal, toString, wasSucceeded
addMonitor, checkCancelled, checkForErrorAndRethrow, clearMonitors, doOnCancel, doOnFailure, execute, executeSubTask, getError, getMaxProgressSteps, getMonitorCount, getMonitors, getName, getProgressStepCount, getResult, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout
checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, 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
cancel
wasCancelled
toDumpString, toDumpString, toString, toString
public RemoteJavaCommandTask(S serverCtx, JavaCommand cmd, SessionId sessionId)
public RemoteJavaCommandTask(S serverCtx, java.lang.String taskName, SessionId sessionId)
public RemoteJavaCommandTask(S serverCtx, LogChannel logCh, JavaCommand cmd, SessionId sessionId)
protected RemoteJavaCommandTask(S serverCtx, LogChannel logCh, java.lang.String taskName, JavaCommand cmd, SessionId sessionId)
public void setJavaCommand(JavaCommand cmd)
JavaCommand
was passed via constructorpublic JavaCommand getJavaCommand()
JavaCommand
that was created by setJavaCommand(JavaCommand)
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<S extends ServerContext>
executeAsync
in class AbstractOsProcessTask<S extends ServerContext>
java.lang.Exception
for synchronous execution
Copyright © 2014 EsprIT-Systems. All Rights Reserved.