public abstract class AbstractJournalTask<S extends ServerContext> extends AbstractRemoteTask<S> implements JournalTask<S>
RemoteTask a JournalTask continues running on the server after a client disconnect.
On client reconnect the task is reattached to the client and will run under client control as before. In order to
make this possible the journal task stores it's RemoteTaskEvents in a JournalTaskMonitor
and replays them on a client reconnect.childTaskRef, isTestMode, monitorController, resultRef, stateFlag| Constructor and Description |
|---|
AbstractJournalTask(S serverCtx,
LogChannel logCh,
RemoteTaskType taskType,
SessionId sessionId) |
AbstractJournalTask(S serverCtx,
LogChannel logCh,
java.lang.String taskName,
RemoteTaskType taskType,
SessionId sessionId) |
AbstractJournalTask(S serverCtx,
SessionId sessionId) |
AbstractJournalTask(S serverCtx,
java.lang.String taskName,
RemoteTaskType taskType,
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.
|
protected JournalTaskMonitor |
createTaskMonitor() |
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
|
addMonitor, cancel, createRunStateFlag, getKillerSessionId, getOwnerSessionId, getRunStateFlag, getSessionId, setSessionIdexecuteSubTask, getServerContextawaitFinished, awaitFinished, awaitStarted, cancel, deregisterTask, doOnFinish, doOnStart, doOnSuccess, executeAsync, executeChildTask, executeChildTask, getCurrentFuture, getMaxChildTasks, getPriority, getProcessingDuration, getStartTime, getStopWatch, handleFinish, handleStart, handleSuccess, isRegisterForCancel, isRunning, notifyProceeded, registerTask, releaseStart, run, setCurrentFuture, setMaxChildTasks, setPriority, setRegisterForCancel, setReleaseTimeout, submitInternal, toString, wasSucceededcheckCancelled, 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, wasCancelledgetApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelconfigureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetSessionIdgetOwnerSessionId, getRunStateFlag, getSessionIdawaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeoutcheckCancelled, checkForErrorAndRethrow, executeAsync, executeSubTask, getName, getResult, getType, handleCancellation, handleFailure, isCancellable, notifyProceeded, setCancellable, setName, setResult, setRunStateFlag, sleepCheckedgetApplicationContextexecuteaddMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitorgetLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelcancelwasCancelledtoDumpString, toDumpString, toString, toStringgetServerContextcancel, getKillerSessionIdpublic AbstractJournalTask(S serverCtx, LogChannel logCh, RemoteTaskType taskType, SessionId sessionId)
public AbstractJournalTask(S serverCtx, LogChannel logCh, java.lang.String taskName, RemoteTaskType taskType, SessionId sessionId)
public AbstractJournalTask(S serverCtx, java.lang.String taskName, RemoteTaskType taskType, SessionId sessionId)
public JournalTaskId submit(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
AsyncTasksubmit in interface AsyncTask<S extends ServerContext>submit in interface RemoteTask<S extends ServerContext>submit in class AbstractRemoteTask<S extends ServerContext>java.lang.Exception - if the pool is busypublic JournalTaskId submit() throws java.lang.Exception
AsyncTasksubmit in interface AsyncTask<S extends ServerContext>submit in interface RemoteTask<S extends ServerContext>submit in class AbstractRemoteTask<S extends ServerContext>java.lang.Exception - if the pool is busyprotected final JournalTaskId createTaskId()
AbstractAsyncTaskTaskId which
is added to the RunStateFlag.createTaskId in class AbstractRemoteTask<S extends ServerContext>public JournalTaskId getTaskId()
AsyncExecutableTaskId is used to model the task-hierarchy in a RunStateFlag.
For AsyncExecutables it's always an instance of PseudoTaskId.getTaskId in interface AsyncExecutable<S extends ServerContext>getTaskId in interface TaskIdHoldergetTaskId in interface JournalTask<S extends ServerContext>getTaskId in interface RemoteTask<S extends ServerContext>getTaskId in class AbstractRemoteTask<S extends ServerContext>protected final JournalTaskMonitor createTaskMonitor()
createTaskMonitor in class AbstractRemoteTask<S extends ServerContext>public final JournalTaskMonitor getJournalMonitor()
getJournalMonitor in interface JournalTask<S extends ServerContext>public final void attachAndPlayEventJournal(SessionId sessionId)
JournalTaskJournalTask 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.