public class LocalEnvironment extends AbstractConfigurationEnvironment
| Constructor and Description |
|---|
LocalEnvironment(int id,
java.nio.file.Path dir) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyFilesFromLocalDisk(java.nio.file.Path srcPath,
java.lang.String destRelPath) |
void |
copyFilesToLocalDisk(java.lang.String srcRelPath,
java.nio.file.Path destPath) |
java.lang.String |
getHostname() |
int |
getId() |
java.lang.String |
getName() |
void |
removeFile(java.lang.String relPath)
Removes specified file.
|
RemoteProcess |
runCommand(java.util.List<java.lang.String> command)
Synchronously runs arbitrary command on this environment's OS.
|
RemoteProcess |
runCommandAsynchronously(java.util.List<java.lang.String> command) |
getProperty, setPropertypublic void copyFilesFromLocalDisk(java.nio.file.Path srcPath,
java.lang.String destRelPath)
throws java.io.IOException
srcPath - Local source path.destRelPath - Relative destination directory on this environment.java.io.IOExceptionpublic void copyFilesToLocalDisk(java.lang.String srcRelPath,
java.nio.file.Path destPath)
throws java.io.IOException
srcRelPath - Relative source path on this environment.destPath - Local destination directory.java.io.IOExceptionpublic java.lang.String getHostname()
public int getId()
public java.lang.String getName()
public RemoteProcess runCommand(java.util.List<java.lang.String> command) throws java.lang.InterruptedException, java.io.IOException
Environmentjava.lang.InterruptedExceptionjava.io.IOExceptionpublic RemoteProcess runCommandAsynchronously(java.util.List<java.lang.String> command) throws java.io.IOException
java.io.IOExceptionpublic void removeFile(java.lang.String relPath)
EnvironmentrelPath - Relative path to file on this environment.