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,
java.util.List<java.lang.String> transferredFiles)
Callback which must be invoked after a related set of files has been
processed.
|
java.lang.String |
transfer(TransferState state)
Transfers a file and returns the appropriate checksum string for
the source file.
|
java.lang.String transfer(TransferState state) throws java.io.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.java.io.IOException
omero.ServerError
void afterTransfer(int errors, java.util.List<java.lang.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.4.4-ice35-b82
Copyright © 2018 The University of Dundee & Open Microscopy Environment. All Rights Reserved.