public abstract class AbstractTransferService extends AbstractServerObject<ServerContext> implements LocalCancellableTask, Executable
AbstractTransferJob
and performs all requested file transfers.Constructor and Description |
---|
AbstractTransferService(ServerContext serverCtx,
TransferServiceTask trTask,
AbstractTransferJob job) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the running task.
|
void |
downloadFileData() |
abstract void |
execute()
Contains the code to be executed.
|
FileDataType |
getFileDataType() |
long |
getRealFileSize() |
java.io.File |
getServerFile() |
protected java.lang.String |
getServerFileInfo() |
TaskId |
getTaskId()
Returns the unique identifier for this task.
|
ServerTransferConnection |
getTransferConnection() |
AbstractTransferJob |
getTransferJob() |
boolean |
isTransferZipped() |
boolean |
wasCancelled()
Tells whether ever an attempt has been made to cancel this task.
|
boolean |
wasFoundZippedOnServer() |
checkPermission, getServerConfig, getServerContext, getStatisticManager, toString
getApplicationContext, getLogChannel, isLogDebug, isLogVerbose, logDebug, logDump, logError, logError, logFatal, logInfo, logVerbose, logWarning, setLogChannel
configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toDumpString, toString
public AbstractTransferService(ServerContext serverCtx, TransferServiceTask trTask, AbstractTransferJob job)
public abstract void execute() throws java.lang.Exception
Executable
execute
in interface Executable
java.lang.Exception
public final long getRealFileSize()
public final FileDataType getFileDataType()
public final ServerTransferConnection getTransferConnection()
public final java.io.File getServerFile()
public AbstractTransferJob getTransferJob()
public final TaskId getTaskId()
TaskIdHolder
TaskId
.getTaskId
in interface TaskIdHolder
public final void cancel()
LocalCancellableTask
CancellableTask.wasCancelled()
will return true. Actually this call cancels the
task's current Future
and enforces a CancellationException
to be thrown.cancel
in interface LocalCancellableTask
public final boolean wasCancelled()
CancellableTask
wasCancelled
in interface CancellableTask
public final boolean isTransferZipped()
public final boolean wasFoundZippedOnServer()
public final void downloadFileData() throws java.io.IOException
java.io.IOException
protected java.lang.String getServerFileInfo()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.