public abstract class RemoteExec extends java.lang.Object implements ExecInterface
Constructor and Description |
---|
RemoteExec() |
Modifier and Type | Method and Description |
---|---|
protected abstract int |
_copyTo(java.io.File lfile,
java.lang.String targetPath,
boolean recursive) |
abstract void |
closeConnection() |
int |
copyFrom(java.lang.String targetPath,
java.util.Collection files,
java.io.File localPath,
boolean recursive)
Copy remote files from a remote directory to a local path Input: 'files'
is a Collection of files of type String (!
|
abstract int |
copyFrom(java.lang.String rfile,
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 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
|
int |
copyTo(java.io.File lfile,
java.lang.String targetPath,
boolean recursive)
Copy a local file to a remote directory/path Input: file of type File
(which can be a directory).
|
boolean |
createDir(java.lang.String dir,
boolean parentflag)
Create directory on the remote site with "mkdir" or "mkdir -p" command.
|
boolean |
deleteFile(java.lang.String fname,
boolean recursive,
boolean allowFileMask)
Delete file or directory on the remote site with "rm -rf" command!
|
abstract boolean |
getForcedCleanUp() |
abstract int |
getTimeout() |
protected void |
kill(java.lang.String pid,
boolean group) |
abstract boolean |
openConnection() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addIdentity, executeCmd, executeCmd, setForcedCleanUp, setPortForwardingL, setPortForwardingR, setTimeout, setTimeout
public RemoteExec()
public abstract boolean openConnection() throws SshException
openConnection
in interface ExecInterface
SshException
public abstract void closeConnection()
closeConnection
in interface ExecInterface
public abstract boolean getForcedCleanUp()
public abstract int getTimeout()
protected abstract int _copyTo(java.io.File lfile, java.lang.String targetPath, boolean recursive) throws SshException
SshException
public abstract int copyFrom(java.lang.String rfile, java.io.File localPath, boolean recursive) throws SshException
ExecInterface
copyFrom
in interface ExecInterface
SshException
protected void kill(java.lang.String pid, boolean group)
public boolean createDir(java.lang.String dir, boolean parentflag) throws ExecException
createDir
in interface ExecInterface
ExecException
public boolean deleteFile(java.lang.String fname, boolean recursive, boolean allowFileMask) throws ExecException
deleteFile
in interface ExecInterface
ExecException
public int copyTo(java.util.Collection files, java.lang.String targetPath, boolean recursive) throws SshException
copyTo
in interface ExecInterface
SshException
public int copyTo(java.io.File lfile, java.lang.String targetPath, boolean recursive) throws SshException
copyTo
in interface ExecInterface
SshException
public int copyFrom(java.lang.String targetPath, java.util.Collection files, java.io.File localPath, boolean recursive) throws SshException
copyFrom
in interface ExecInterface
SshException