public interface FileTransfer
FileTransfer
instance 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 |
---|---|
void |
afterTransfer(int errors,
List<String> transferredFiles)
Callback which must be invoked after a related set of files has been
processed.
|
String |
transfer(TransferState state)
Transfers a file and returns the appropriate checksum string for
the source file.
|
String transfer(TransferState state) throws IOException, omero.ServerError
TransferState
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.IOException
omero.ServerError
void afterTransfer(int errors, List<String> transferredFiles) throws CleanupFailure
FileTransfer
instance 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.CleanupFailure
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.