public abstract class AbstractJournalOsProcessTask<S extends ServerContext> extends AbstractRemoteOsProcessTask<S> implements JournalTask<S>
JournalTask
OUTPUT_TYPE_CONSOLE
childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
AbstractJournalOsProcessTask(S serverCtx,
LogChannel logCh,
java.lang.String taskName,
RemoteTaskType taskType,
SessionId sessionId) |
AbstractJournalOsProcessTask(S serverCtx,
SessionId sessionId) |
AbstractJournalOsProcessTask(S serverCtx,
java.lang.String taskName,
SessionId sessionId) |
Modifier and Type | Method and Description |
---|---|
void |
attachAndPlayEventJournal(SessionId sessionId)
Re-attaches to the
JournalTask and forces it to sent all stored and future events
to the given session. |
protected JournalTaskId |
createTaskId()
Is called at submit time.
|
JournalTaskMonitor |
getJournalMonitor() |
JournalTaskId |
getTaskId()
Returns an identifier object for this task.
|
JournalTaskId |
submit()
Submits this task for execution to the default application thread pool
|
JournalTaskId |
submit(java.util.concurrent.ExecutorService pool)
Submits this task for execution to the given thread pool
|
cancel, createRunStateFlag, createTaskMonitor, doOnStart, getKillerSessionId, getOwnerSessionId, getRunStateFlag, getServerContext, getSessionId, setSessionId
cancel, checkExitStatus, createStandardInput, createStandardOutput, createStandardOutputFile, doOnConsoleOutput, doOnFileSystemChange, doOnFinish, executeAsync, 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
setSessionId
getOwnerSessionId, getRunStateFlag, getSessionId
awaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout
checkCancelled, checkForErrorAndRethrow, executeAsync, 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
getServerContext
cancel, getKillerSessionId
public AbstractJournalOsProcessTask(S serverCtx, java.lang.String taskName, SessionId sessionId)
public AbstractJournalOsProcessTask(S serverCtx, LogChannel logCh, java.lang.String taskName, RemoteTaskType taskType, SessionId sessionId)
public JournalTaskId submit(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
AsyncTask
submit
in interface AsyncTask<S extends ServerContext>
submit
in interface RemoteTask<S extends ServerContext>
submit
in class AbstractRemoteOsProcessTask<S extends ServerContext>
java.lang.Exception
- if the pool is busypublic JournalTaskId submit() throws java.lang.Exception
AsyncTask
submit
in interface AsyncTask<S extends ServerContext>
submit
in interface RemoteTask<S extends ServerContext>
submit
in class AbstractRemoteOsProcessTask<S extends ServerContext>
java.lang.Exception
- if the pool is busyprotected final JournalTaskId createTaskId()
AbstractAsyncTask
TaskId
which
is added to the RunStateFlag
.createTaskId
in class AbstractRemoteOsProcessTask<S extends ServerContext>
public JournalTaskId getTaskId()
AsyncExecutable
TaskId
is used to model the task-hierarchy in a RunStateFlag
.
For AsyncExecutable
s it's always an instance of PseudoTaskId
.getTaskId
in interface AsyncExecutable<S extends ServerContext>
getTaskId
in interface TaskIdHolder
getTaskId
in interface JournalTask<S extends ServerContext>
getTaskId
in interface RemoteTask<S extends ServerContext>
getTaskId
in class AbstractRemoteOsProcessTask<S extends ServerContext>
public final JournalTaskMonitor getJournalMonitor()
getJournalMonitor
in interface JournalTask<S extends ServerContext>
public final void attachAndPlayEventJournal(SessionId sessionId)
JournalTask
JournalTask
and forces it to sent all stored and future events
to the given session.attachAndPlayEventJournal
in interface JournalTask<S extends ServerContext>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.