public abstract class AbstractClientEDT<C extends ClientContext> extends AbstractClientTask<C> implements RemoteTaskEventReceiver<C>
RemoteTaskEvents received from there. It
finishes, when the remote task has finished. If this task is cancelled, then in fact the remote counterpart task is
cancelled first.childTaskRef, isTestMode, monitorController, resultRef, stateFlag| Constructor and Description |
|---|
AbstractClientEDT(C ctx) |
AbstractClientEDT(C ctx,
LogChannel logCh) |
AbstractClientEDT(C ctx,
LogChannel logCh,
java.lang.String taskName,
TaskType taskType) |
AbstractClientEDT(C ctx,
java.lang.String taskName) |
AbstractClientEDT(C ctx,
java.lang.String taskName,
TaskType taskType) |
AbstractClientEDT(C ctx,
TaskType taskType) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the remote counterpart task running on the server using a
RemoteTaskCancelAgent. |
void |
executeAsync()
Must be overridden to perform the async part.
|
RemoteTaskEventForwarder |
getEventForwarder() |
RemoteRunStateFlag |
getLastReceivedRemoteRunStateFlag() |
SessionId |
getOwnerSessionId()
Returns the originator sessionId or the connection sessionId if owner is not set
|
protected abstract RemoteTaskCreator |
getRemoteTaskCreator()
Creates the agent that is responsible for starting the remote task.
|
RemoteTaskId |
getRemoteTaskId()
Returns the
RemoteTaskId of the remotely running task as received within the RemoteTaskStartAgent
. |
boolean |
isForwardingEvents() |
void |
receivedTaskEvent(RemoteTaskEvent event)
Is called whenever this task has received a
RemoteTaskEvent from the remotely running task. |
void |
setEventForwarder(RemoteTaskEventForwarder eventForwarder)
Sets the forwarder for
RemoteTaskEvents |
void |
setOwnerSessionId(SessionId ownerSessId)
Sets the originator sessionId
|
executeSubTask, getClientContext, getSessionIdawaitFinished, 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, toString, wasSucceededaddMonitor, checkCancelled, 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, toDumpString, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitFinished, awaitFinished, awaitStarted, executeChildTask, executeChildTask, getError, getProcessingDuration, hasError, isRegisterForCancel, isRunning, releaseStart, setName, setReleaseTimeout, submit, submitcheckCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, 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, setLogChannelwasCancelledgetTaskIdtoDumpString, toDumpString, toString, toStringgetClientContextpublic AbstractClientEDT(C ctx)
public AbstractClientEDT(C ctx, java.lang.String taskName)
public AbstractClientEDT(C ctx, LogChannel logCh)
public AbstractClientEDT(C ctx, LogChannel logCh, java.lang.String taskName, TaskType taskType)
public void setEventForwarder(RemoteTaskEventForwarder eventForwarder)
RemoteTaskEventspublic RemoteTaskEventForwarder getEventForwarder()
public boolean isForwardingEvents()
public final 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 setOwnerSessionId(SessionId ownerSessId)
public SessionId getOwnerSessionId()
public RemoteTaskId getRemoteTaskId()
RemoteTaskId of the remotely running task as received within the RemoteTaskStartAgent
.public void cancel()
RemoteTaskCancelAgent.cancel in interface LocalCancellableTaskcancel in class AbstractAsyncTask<C extends ClientContext>protected abstract RemoteTaskCreator getRemoteTaskCreator()
public void receivedTaskEvent(RemoteTaskEvent event)
RemoteTaskEvent from the remotely running task. Within this
method we may investigate the event type and perform an appropriate reaction. Note that any RuntimeException
thrown here will not break the event iteration.receivedTaskEvent in interface RemoteTaskEventReceiver<C extends ClientContext>public RemoteRunStateFlag getLastReceivedRemoteRunStateFlag()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.