public abstract class AbstractFileTransfer extends java.lang.Object implements FileTransfer
FileTransfer implementation primarily providing the
 start(TransferState) and finish(TransferState, long)
 methods. Also used as the factory for FileTransfer implementations
 via createTransfer(String).| Modifier and Type | Class and Description | 
|---|---|
| static class  | AbstractFileTransfer.TransfersEnum of well-known  FileTransfernames. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected org.slf4j.Logger | log | 
| Constructor and Description | 
|---|
| AbstractFileTransfer() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | cleanupUpload(RawFileStorePrx rawFileStore,
             java.io.FileInputStream stream)Utility method for closing resources. | 
| static FileTransfer | createTransfer(java.lang.String arg)Factory method for instantiating  FileTransferobjects from
 a string. | 
| protected void | deleteTransferredFiles(int errors,
                      java.util.List<java.lang.String> srcFiles)Method used by subclasses during  FileTransfer.afterTransfer(int, List)if they would like to remove all the files transferred in the set. | 
| protected java.lang.String | finish(TransferState state,
      long offset)Save the current state to disk and finish all timing and logging. | 
| protected boolean | isWindows()Uses os.name to determine whether or not this JVM is running
 under Windows. | 
| protected void | printLine() | 
| protected RawFileStorePrx | start(TransferState state)Minimal start method which logs the file, calls
  TransferState.start(), and loads theRawFileStorePrxwhich any implementation will need. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterTransfer, transferpublic static FileTransfer createTransfer(java.lang.String arg)
FileTransfer objects from
 a string. Supported values can be found in the AbstractFileTransfer.Transfers enum.
 Otherwise, a FQN for a class on the classpath should be passed in.arg - a type of FileTransfer instance as named among AbstractFileTransfer.TransfersFileTransfer instance of the requested typeprotected RawFileStorePrx start(TransferState state) throws ServerError
TransferState.start(), and loads the RawFileStorePrx
 which any implementation will need.state - the transfer stateServerError - if the uploader could not be obtainedprotected java.lang.String finish(TransferState state, long offset) throws ServerError
state - non-nulloffset - total length transferred.ServerError - if the upload could not be completed and checksummedprotected void cleanupUpload(RawFileStorePrx rawFileStore, java.io.FileInputStream stream) throws ServerError
rawFileStore - possibly nullstream - possibly nullServerError - presently not at all as errors are simply logged, but possibly in the futureprotected boolean isWindows()
protected void printLine()
protected void deleteTransferredFiles(int errors,
                                      java.util.List<java.lang.String> srcFiles)
                               throws CleanupFailure
FileTransfer.afterTransfer(int, List)
 if they would like to remove all the files transferred in the set.CleanupFailure