|
||||||||||
| 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(java.util.Properties p,
LogProxy lp)
Constructor for the RemoteCmdLineExecutor |
|
| Method Summary | |
|---|---|
java.lang.String |
buildSingleCommand(java.lang.String cmdToExecute,
java.lang.String[] args,
java.lang.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(java.lang.String cmdToExecute)
Execute the command on the target machine. |
Entry |
executeCommand(java.lang.String cmdToExecute,
java.lang.String[] args,
java.lang.String argDelimiter)
Execute the command on the target machine. |
char |
getOSSeparator()
Return the correct path separator for the target system. |
java.lang.String |
getRandomDir(java.lang.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(java.lang.String dir)
Remove a file/directory from the target |
void |
setExecutorCmdArgsEncoding(java.lang.String enc)
Sets encoding for the command arguments before executing the actual command |
void |
transferFile(java.lang.String local,
java.lang.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(java.util.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(java.lang.String cmdToExecute)
throws RemoteConnectException,
GeneralCLFCException
executeCommand in interface CmdLineExecutorcmdToExecute - The command to be executed
RemoteConnectException
GeneralCLFCException
public Entry executeCommand(java.lang.String cmdToExecute,
java.lang.String[] args,
java.lang.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 java.lang.String getRandomDir(java.lang.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(java.lang.String local,
java.lang.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(java.lang.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 java.lang.String buildSingleCommand(java.lang.String cmdToExecute,
java.lang.String[] args,
java.lang.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()
public void setExecutorCmdArgsEncoding(java.lang.String enc)
setExecutorCmdArgsEncoding in interface CmdLineExecutorenc - encoding to be used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||