|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CmdLineExecutor
The object that connects to the target machine, executes the commands and returns the results.
Method Summary | |
---|---|
void |
close()
Close the connection to the target |
Entry |
executeCommand(String cmd)
Execute the command on the target machine. |
Entry |
executeCommand(String cmd,
String[] args,
String argDelimiter)
Execute the command on the target machine. |
char |
getOSSeparator()
Return the correct path separator for the target system. |
String |
getRandomDir(String path)
Create a random directory on the target machine. |
boolean |
prepareConnection()
Create a connection with the target machine |
void |
removeDir(String dirPath)
Remove a file/directory from the target |
void |
transferFile(String localStdin,
String remoteStdin)
Transfer file localStdin to remoteStdin. |
Method Detail |
---|
Entry executeCommand(String cmd) throws GeneralCLFCException
cmd
- The command to be executed
GeneralCLFCException
- When an exception occurs trying to execute the command remotely.Entry executeCommand(String cmd, String[] args, String argDelimiter) throws GeneralCLFCException
cmd
- The command to be executedargs
- The command arguments as a String ArrayargDelimiter
- The command argument delimiter
GeneralCLFCException
- When an exception occurs trying to execute the command remotely.boolean prepareConnection() throws GeneralCLFCException
GeneralCLFCException
String getRandomDir(String path) throws GeneralCLFCException
path
- The path to the directory under which the random directory is to be created
GeneralCLFCException
- If random directory creation failsvoid transferFile(String localStdin, String remoteStdin) throws GeneralCLFCException
localStdin
- Path to standard input source file on local machineremoteStdin
- Path to standard input destination file on target machine
GeneralCLFCException
- If file transfer is unsuccessfulvoid removeDir(String dirPath) throws GeneralCLFCException
dirPath
- Path to the file/folder to be removed on target machine
GeneralCLFCException
- If delete operation is unsuccessfulchar getOSSeparator() throws GeneralCLFCException
GeneralCLFCException
- If problems encountered obtaining the OS Separator.void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |