public abstract class AbstractFileTransferTask<C extends ClientContext,S extends ServerContext> extends AbstractClientTask<C>
FileTransferAgent with the jobs addedchildTaskRef, isTestMode, monitorController, resultRef, stateFlag| Constructor and Description |
|---|
AbstractFileTransferTask(C ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addJob(FileTransferJob job)
Adds a
FileTransferJob to the underlying FileTransferAgent |
void |
cancel()
Flags the task as being cancelled.
|
void |
clearJobs() |
protected FileTransferAgent<C,S> |
createFileTransferAgent() |
void |
doOnStart()
Is called when the task actually has started.
|
void |
executeAsync()
Must be overridden to perform the async part.
|
FileTransferAgent<C,S> |
getAgent() |
int |
getJobCount() |
java.util.List<FileTransferJob> |
getJobList() |
void |
setTransferLocked(boolean isLocked) |
TaskId |
submit(java.util.concurrent.ExecutorService pool)
Submits this task for execution to the given thread pool
|
executeSubTask, getClientContext, getSessionIdawaitFinished, awaitFinished, awaitStarted, createTaskId, deregisterTask, doOnFinish, 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, 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, waitcheckCancelled, checkForErrorAndRethrow, executeSubTask, getName, getResult, getRunStateFlag, getTaskId, getType, handleCancellation, handleFailure, isCancellable, setCancellable, setName, setResult, setRunStateFlag, sleepCheckedgetApplicationContextexecuteaddMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitorgetLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannelwasCancelledgetTaskIdtoDumpString, toDumpString, toStringpublic AbstractFileTransferTask(C ctx)
public FileTransferAgent<C,S> getAgent()
protected FileTransferAgent<C,S> createFileTransferAgent()
public void doOnStart()
throws java.lang.Exception
AbstractAsyncTaskdoOnStart in class AbstractAsyncTask<C extends ClientContext>java.lang.Exceptionpublic 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 setTransferLocked(boolean isLocked)
public TaskId submit(java.util.concurrent.ExecutorService pool) throws java.lang.Exception
AsyncTasksubmit in interface AsyncTask<C extends ClientContext>submit in class AbstractAsyncTask<C extends ClientContext>java.lang.Exception - if the pool is busypublic void addJob(FileTransferJob job)
FileTransferJob to the underlying FileTransferAgentpublic int getJobCount()
public void clearJobs()
public java.util.List<FileTransferJob> getJobList()
public void cancel()
AbstractAsyncTaskAbstractAsyncExecutable.checkCancelled() will
result a CancellationException being thrown. As a result
AbstractAsyncExecutable.doOnCancel() is being called on the task.cancel in interface LocalCancellableTaskcancel in class AbstractAsyncTask<C extends ClientContext>Copyright © 2013 EsprIT-Systems. All Rights Reserved.