public interface FileTransfer
FileTransferinstance should be used for all the instances in a single "import". Implementations are responsible for making sure that when the server accesses the remote (i.e. server-side) location that a file-like object (file, hard-link, soft-link, etc.) is present with the right size and checksum. Transfer implementations have a number of responsibilities such as reporting on progress and estimating remaining time which make them not completely trivial to implement. Sub-classing an existing implementation is likely the easiest way to modify behavior. Implementations should be thread-safe, i.e. callable from multiple threads, and blocking should be avoided if at all possible.
|Modifier and Type||Method and Description|
Callback which must be invoked after a related set of files has been processed.
Transfers a file and returns the appropriate checksum string for the source file.
String transfer(TransferState state) throws IOException, omero.ServerError
TransferStateinstance 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.
void afterTransfer(int errors, List<String> transferredFiles) throws CleanupFailure
FileTransferinstance a chance to free resources. If any errors have occurred, then no destructive changes should be made, though the user may should be given the option to react.
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.