|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.di.fc.remotecmdlnfc.RemoteCmdLineExecutor
public class RemoteCmdLineExecutor
The CmdLineExecutor that connects to and executes commands on a remote machine
| Constructor Summary | |
|---|---|
RemoteCmdLineExecutor(Properties p,
LogProxy lp)
Constructor for the RemoteCmdLineExecutor |
|
| Method Summary | |
|---|---|
String |
buildSingleCommand(String cmdToExecute,
String[] args,
String argDelimiter)
Constructs a single String that represents the command and all its arguments seperated with the specified delimiter. |
void |
close()
Close the connection to the target |
Entry |
executeCommand(String cmdToExecute)
Execute the command on the target machine. |
Entry |
executeCommand(String cmdToExecute,
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. |
com.ibm.tivoli.remoteaccess.RemoteAccess |
getRXAProtocol()
Return the connection object accessing the target machine |
boolean |
prepareConnection()
Create a connection with the target machine |
void |
removeDir(String dir)
Remove a file/directory from the target |
void |
transferFile(String local,
String remote)
Transfer file localStdin to remoteStdin. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteCmdLineExecutor(Properties p,
LogProxy lp)
p - The properties for the executor connectionlp - The LogProxy for logging| Method Detail |
|---|
public boolean prepareConnection()
throws RemoteConnectException,
ParamException
prepareConnection in interface CmdLineExecutorRemoteConnectException
ParamException
public Entry executeCommand(String cmdToExecute)
throws RemoteConnectException,
GeneralCLFCException
executeCommand in interface CmdLineExecutorcmdToExecute - The command to be executed
RemoteConnectException
GeneralCLFCException
public Entry executeCommand(String cmdToExecute,
String[] args,
String argDelimiter)
throws RemoteConnectException,
GeneralCLFCException
executeCommand in interface CmdLineExecutorcmdToExecute - The command to be executedargs - The command arguments as a String ArrayargDelimiter - The command argument delimiter
RemoteConnectException
GeneralCLFCException
public String getRandomDir(String path)
throws GeneralCLFCException
getRandomDir in interface CmdLineExecutorpath - The path to the directory under which the random directory is to be created
GeneralCLFCException - If random directory creation fails
public void transferFile(String local,
String remote)
throws GeneralCLFCException
transferFile in interface CmdLineExecutorlocal - Path to standard input source file on local machineremote - Path to standard input destination file on target machine
GeneralCLFCException - If file transfer is unsuccessful
public void removeDir(String dir)
throws GeneralCLFCException
removeDir in interface CmdLineExecutordir - Path to the file/folder to be removed on target machine
GeneralCLFCException - If delete operation is unsuccessful
public char getOSSeparator()
throws RemoteConnectException
getOSSeparator in interface CmdLineExecutorRemoteConnectException - If problems encountered obtaining the OS Separator.public void close()
close in interface CmdLineExecutor
public String buildSingleCommand(String cmdToExecute,
String[] args,
String argDelimiter)
cmdToExecute - The command to be executedargs - The command arguments as a String ArrayargDelimiter - The command argument delimiter
Return the connection object accessing the target machine
public com.ibm.tivoli.remoteaccess.RemoteAccess getRXAProtocol()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||