public interface ExecInterface
Modifier and Type | Method and Description |
---|---|
void |
addIdentity(java.lang.String identity)
addIdentity, useless for local exec
|
void |
closeConnection() |
int |
copyFrom(java.lang.String sourcePath,
java.util.Collection files,
java.io.File localPath,
boolean recursive)
Copy files from a local/remote directory to a local path Input: 'files'
is a Collection of files of type String (!
|
int |
copyFrom(java.lang.String sourcePath,
java.io.File localPath,
boolean recursive)
Copy a local/remote file into a local file Input: 'sourcePath' of type
String (can be a directory or filename) 'localPath' is either a directory
or filename Only if 'recursive' is set, will directories copied
recursively.
|
int |
copyTo(java.util.Collection files,
java.lang.String targetPath,
boolean recursive)
Copy local files to a local/remote directory Input: files is a Collection
of files of type File, targetPath is either a directory in case of
several files, or it is either a dir or filename in case of one single
local file recursive: true if you want traverse directories The files can
have wildcards in their names but not in their path.
|
int |
copyTo(java.io.File lfile,
java.lang.String targetPath,
boolean recursive)
Copy a local file to a local/remote directory Input: file of type File
(which can be a directory) The input can have wildcards in its name but
not in its path. targetPath is either a directory or filename
|
boolean |
createDir(java.lang.String dir,
boolean parentflag)
Create directory.
|
boolean |
deleteFile(java.lang.String fname,
boolean recursive,
boolean allowFileMask)
Delete file or directory on the local/remote site It should be relative
to the user's home dir in case of remote machines, or to the current dir
in case of local machine, or an absolute path For safety, * and ?
|
int |
executeCmd(java.lang.String command,
java.io.OutputStream streamOut,
java.io.OutputStream streamErr)
Execute a command externally.
|
int |
executeCmd(java.lang.String command,
java.io.OutputStream streamOut,
java.io.OutputStream streamErr,
java.lang.String thirdParty)
Execute a command externally where the command connects to a third party
and needs to authenticate to that third party.
|
boolean |
openConnection() |
void |
setForcedCleanUp(boolean foo)
Specify if killing of external processes (i.e. clean-up) after error or
timeout is required.
|
void |
setPortForwardingL(java.lang.String spec)
port forwarding not working on local exec
|
void |
setPortForwardingR(java.lang.String spec)
port forwarding not working on local exec
|
void |
setTimeout(int seconds)
Set timeout for the operations.
|
void |
setTimeout(int seconds,
boolean stdout,
boolean stderr)
Set timeout for the operations.
|
int executeCmd(java.lang.String command, java.io.OutputStream streamOut, java.io.OutputStream streamErr) throws ExecException
ExecException
int executeCmd(java.lang.String command, java.io.OutputStream streamOut, java.io.OutputStream streamErr, java.lang.String thirdParty) throws ExecException
ExecException
boolean createDir(java.lang.String dir, boolean parentflag) throws ExecException
ExecException
boolean deleteFile(java.lang.String fname, boolean recursive, boolean allowFileMask) throws ExecException
ExecException
int copyTo(java.util.Collection files, java.lang.String targetPath, boolean recursive) throws ExecException
ExecException
int copyTo(java.io.File lfile, java.lang.String targetPath, boolean recursive) throws ExecException
ExecException
int copyFrom(java.lang.String sourcePath, java.util.Collection files, java.io.File localPath, boolean recursive) throws ExecException
ExecException
int copyFrom(java.lang.String sourcePath, java.io.File localPath, boolean recursive) throws ExecException
ExecException
void setForcedCleanUp(boolean foo)
void setTimeout(int seconds, boolean stdout, boolean stderr)
void setTimeout(int seconds)
void addIdentity(java.lang.String identity)
void setPortForwardingL(java.lang.String spec) throws ExecException
ExecException
void setPortForwardingR(java.lang.String spec) throws ExecException
ExecException
boolean openConnection() throws ExecException
ExecException
void closeConnection()