public interface RemoteTask<S extends ServerContext> extends AsyncTask<S>, ServerObject<S>, RemoteCancellableTask
AsyncTask
is being submitted to a pool.
Note that a RemoteTask
must be submitted with a SessionId
and thus
always knows who its owner is.Modifier and Type | Method and Description |
---|---|
SessionId |
getOwnerSessionId()
Returns the
SessionId of the session that owns this task. |
RemoteRunStateFlag |
getRunStateFlag()
Returns the
RemoteRunStateFlag of this task |
SessionId |
getSessionId()
Returns the
SessionId of the Session that submitted this task |
RemoteTaskId |
getTaskId()
Returns the
RemoteTaskId of this task |
RemoteTaskId |
submit()
Submits this task for execution into the default application thread pool
|
RemoteTaskId |
submit(java.util.concurrent.ExecutorService pool)
Submits this task for execution into the given thread pool
|
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
RemoteTaskId submit() throws java.lang.Exception
submit
in interface AsyncTask<S extends ServerContext>
java.lang.Exception
- if the pool is busyRemoteTaskId submit(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
submit
in interface AsyncTask<S extends ServerContext>
java.lang.Exception
- if the pool is busyRemoteRunStateFlag getRunStateFlag()
RemoteRunStateFlag
of this taskgetRunStateFlag
in interface AsyncExecutable<S extends ServerContext>
RemoteTaskId getTaskId()
RemoteTaskId
of this taskgetTaskId
in interface AsyncExecutable<S extends ServerContext>
getTaskId
in interface TaskIdHolder
SessionId getSessionId()
SessionId
of the Session that submitted this taskgetOwnerSessionId()
SessionId getOwnerSessionId()
SessionId
of the session that owns this task.
Note the difference to getSessionId()
. A task that runs i.e. in a CoClientContext
might have the SessionId
of that context. But the real owner-id of the task is the SessionId
of the user that is logged in on the server!getSessionId()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.