Package ome.formats.importer.transfers
Class UploadFileTransfer
- java.lang.Object
-
- ome.formats.importer.transfers.AbstractFileTransfer
-
- ome.formats.importer.transfers.UploadFileTransfer
-
- All Implemented Interfaces:
FileTransfer
- Direct Known Subclasses:
UploadRmFileTransfer
public class UploadFileTransfer extends AbstractFileTransfer
Traditional file transfer mechanism which uploads files using the API. This is done by reading fromTransferState.getFile()
intoTransferState.getBuffer()
and thenwriting
to the server. Not thread safe- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ome.formats.importer.transfers.AbstractFileTransfer
AbstractFileTransfer.Transfers
-
-
Field Summary
-
Fields inherited from class ome.formats.importer.transfers.AbstractFileTransfer
log
-
-
Constructor Summary
Constructors Constructor Description UploadFileTransfer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTransfer(int errors, java.util.List<java.lang.String> srcFiles)
Since theRawFileStorePrx
instances are cleaned up after each transfer, there's no need to cleanup perFile
.java.lang.String
transfer(TransferState state)
Transfers a file and returns the appropriate checksum string for the source file.-
Methods inherited from class ome.formats.importer.transfers.AbstractFileTransfer
cleanupUpload, createTransfer, deleteTransferredFiles, finish, isWindows, printLine, start
-
-
-
-
Method Detail
-
transfer
public java.lang.String transfer(TransferState state) throws java.io.IOException, ServerError
Description copied from interface:FileTransfer
Transfers a file and returns the appropriate checksum string for the source file. TheTransferState
instance should be unique for this invocation, i.e. not used by any other threads. After execution, the fields can be inspected to see, e.g., the newly created file.- Throws:
java.io.IOException
ServerError
-
afterTransfer
public void afterTransfer(int errors, java.util.List<java.lang.String> srcFiles) throws CleanupFailure
Since theRawFileStorePrx
instances are cleaned up after each transfer, there's no need to cleanup perFile
.- Throws:
CleanupFailure
-
-