public class FileTransferClientTask<C extends ClientContext> extends AbstractSwingTask<C> implements ClientObject<C>
FileUploadConnection
or a FileDownloadConnection
depending on the transfer direction. It communicates to
its remote counterpart TransferServiceTask
via the transfer service for transporting
the stream data.childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
FileTransferClientTask(C clientCtx,
AgentId agentId) |
Modifier and Type | Method and Description |
---|---|
protected void |
doOnFinish()
Is called in ANY CASE when the task has finished.
|
void |
executeAsync()
Must be overridden to perform the async part.
|
AgentId |
getAgentId() |
C |
getClientContext()
Returns the the client runtime environment
|
FileTransferJob |
getCurrentJob()
Returns the job currently in transfer
|
JobId |
getJobId() |
FileTransferJobList |
getJobList() |
java.awt.Color |
getRenderColor() |
javax.swing.Icon |
getRenderIcon() |
java.lang.String |
getRenderText() |
SessionId |
getSessionId() |
TransferDirection |
getTransferDirection() |
void |
setJobList(FileTransferJobList jobs) |
TaskId |
submit(java.util.concurrent.ExecutorService pool)
Submits this task for execution to the given thread pool
|
addMonitor, addTaskListener, awaitEventsDone, doneChildFinished, doneChildStarted, doneTaskCancelled, doneTaskFailed, doneTaskFinished, doneTaskProceeded, doneTaskStarted, doneTaskStateChanged, doneTaskSucceeded, getActionCancel, getSwingTaskMonitor, isRegisterInTaskList, removeTaskListener, showError, showError, showError, showInfo, showInfo, showWarning, showWarning
awaitFinished, awaitFinished, awaitStarted, cancel, createTaskId, deregisterTask, 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, submitInternal, toString, wasSucceeded
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, wasCancelled
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepChecked
getApplicationContext
execute
clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
wasCancelled
getTaskId
toDumpString, toDumpString, toString
public SessionId getSessionId()
public final C getClientContext()
ClientObject
getClientContext
in interface ClientObject<C extends ClientContext>
public final void setJobList(FileTransferJobList jobs)
public final JobId getJobId()
public final AgentId getAgentId()
public final TransferDirection getTransferDirection()
public final FileTransferJobList getJobList()
public final TaskId submit(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
AsyncTask
submit
in interface AsyncTask<C extends ClientContext>
submit
in class AbstractAsyncTask<C extends ClientContext>
java.lang.Exception
- if the pool is busypublic 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<C extends ClientContext>
executeAsync
in class AbstractAsyncTask<C extends ClientContext>
java.lang.Exception
for synchronous execution
protected void doOnFinish()
AbstractAsyncTask
doOnFinish
in class AbstractAsyncTask<C extends ClientContext>
public FileTransferJob getCurrentJob()
public java.lang.String getRenderText()
getRenderText
in interface Renderable
getRenderText
in class AbstractSwingTask<C extends ClientContext>
public javax.swing.Icon getRenderIcon()
getRenderIcon
in interface Renderable
getRenderIcon
in class AbstractSwingTask<C extends ClientContext>
public java.awt.Color getRenderColor()
getRenderColor
in interface Renderable
getRenderColor
in class AbstractSwingTask<C extends ClientContext>
Copyright © 2014 EsprIT-Systems. All Rights Reserved.