public abstract class AbstractExecFileTransfer extends AbstractFileTransfer
AbstractFileTransfer.Transfers
log
Constructor and Description |
---|
AbstractExecFileTransfer() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkLocation(File location,
omero.api.RawFileStorePrx rawFileStore)
Check that the target location: 1) doesn't exist and 2) is properly
written to by the server.
|
protected void |
checkTarget(File location,
TransferState state)
Check that the server can properly read the copied file.
|
protected abstract ProcessBuilder |
createProcessBuilder(File file,
File location)
Creates a
ProcessBuilder instance ready to have
ProcessBuilder.start() called on it. |
protected void |
exec(File file,
File location)
Executes a local command and fails on non-0 return codes.
|
protected RuntimeException |
failLocationCheck(File location,
String msg) |
protected File |
getLocalLocation(omero.model.OriginalFile root,
omero.model.OriginalFile ofile)
Build a path of the form "root.path/root.name/file.path/file.name".
|
protected void |
printLine() |
String |
transfer(TransferState state)
"Transfer" files by soft-linking them into place.
|
cleanupUpload, createTransfer, deleteTransferredFiles, finish, isWindows, start
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterTransfer
public String transfer(TransferState state) throws IOException, omero.ServerError
createProcessBuilder(File, File)
and the other protected methods here.IOException
omero.ServerError
protected File getLocalLocation(omero.model.OriginalFile root, omero.model.OriginalFile ofile)
root
- ofile
- protected void checkLocation(File location, omero.api.RawFileStorePrx rawFileStore) throws omero.ServerError, IOException
location
- rawFileStore
- omero.ServerError
IOException
protected RuntimeException failLocationCheck(File location, String msg)
protected void exec(File file, File location) throws IOException
file
- location
- IOException
protected void checkTarget(File location, TransferState state) throws omero.ServerError
checkLocation(File, RawFileStorePrx)
but after
the invocation of exec(File, File)
, there is some chance, likely
due to file permissions, that the server will not be able to read the
transfered file. If so, raise an exception and leave the user to cleanup
and modifications.omero.ServerError
protected abstract ProcessBuilder createProcessBuilder(File file, File location)
ProcessBuilder
instance ready to have
ProcessBuilder.start()
called on it. The only critical
piece of information should be the return code.file
- location
- protected void printLine()
printLine
in class AbstractFileTransfer
Version: 5.1.2-ice35-b45
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.