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, waitaddIdentity, executeCmd, executeCmd, setForcedCleanUp, setPortForwardingL, setPortForwardingR, setTimeout, setTimeoutpublic RemoteExec()
public abstract boolean openConnection() throws SshException
openConnection in interface ExecInterfaceSshExceptionpublic abstract void closeConnection()
closeConnection in interface ExecInterfacepublic abstract boolean getForcedCleanUp()
public abstract int getTimeout()
protected abstract int _copyTo(java.io.File lfile, java.lang.String targetPath, boolean recursive) throws SshException
SshExceptionpublic abstract int copyFrom(java.lang.String rfile, java.io.File localPath, boolean recursive) throws SshException
ExecInterfacecopyFrom in interface ExecInterfaceSshExceptionprotected void kill(java.lang.String pid, boolean group)
public boolean createDir(java.lang.String dir, boolean parentflag) throws ExecException
createDir in interface ExecInterfaceExecExceptionpublic boolean deleteFile(java.lang.String fname, boolean recursive, boolean allowFileMask) throws ExecException
deleteFile in interface ExecInterfaceExecExceptionpublic int copyTo(java.util.Collection files, java.lang.String targetPath, boolean recursive) throws SshException
copyTo in interface ExecInterfaceSshExceptionpublic int copyTo(java.io.File lfile, java.lang.String targetPath, boolean recursive) throws SshException
copyTo in interface ExecInterfaceSshExceptionpublic int copyFrom(java.lang.String targetPath, java.util.Collection files, java.io.File localPath, boolean recursive) throws SshException
copyFrom in interface ExecInterfaceSshException