public class TransferServiceTask extends AbstractServerTask<ServerContext>
FileUploadService
,
FileDownloadService
and FileDownstreamService
.childTaskRef, isTestMode, monitorController, resultRef, stateFlag
Constructor and Description |
---|
TransferServiceTask(ServerTransferConnection transferConn) |
Modifier and Type | Method and Description |
---|---|
void |
executeAsync()
Must be overridden to perform the async part.
|
ServerTransferConnection |
getTransferConnection() |
void |
processFileStreamJob(FileStreamJob job) |
void |
processFileTransferJob(FileTransferJob job) |
TaskId |
submit()
Submits this task for execution to the default application thread pool
|
executeSubTask, getServerContext
awaitFinished, awaitFinished, awaitStarted, cancel, 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, submitInternal, toString, wasSucceeded
addMonitor, 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
addMonitor, clearMonitors, getMonitorCount, getMonitors, hasMonitor, removeMonitor
getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
wasCancelled
getTaskId
toDumpString, toDumpString, toString
public TransferServiceTask(ServerTransferConnection transferConn)
public TaskId submit() throws java.lang.Exception
AsyncTask
submit
in interface AsyncTask<ServerContext>
submit
in class AbstractAsyncTask<ServerContext>
java.lang.Exception
- if the pool is busypublic ServerTransferConnection getTransferConnection()
public void executeAsync()
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<ServerContext>
executeAsync
in class AbstractAsyncTask<ServerContext>
for synchronous execution
public void processFileStreamJob(FileStreamJob job)
public void processFileTransferJob(FileTransferJob job) throws java.lang.Exception
java.lang.Exception
Copyright © 2014 EsprIT-Systems. All Rights Reserved.