|
||||||||||
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 loggingMethod Detail |
---|
public boolean prepareConnection() throws RemoteConnectException, ParamException
prepareConnection
in interface CmdLineExecutor
RemoteConnectException
ParamException
public Entry executeCommand(java.lang.String cmdToExecute) throws RemoteConnectException, GeneralCLFCException
executeCommand
in interface CmdLineExecutor
cmdToExecute
- 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 CmdLineExecutor
cmdToExecute
- 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 CmdLineExecutor
path
- The path to the directory under which the random directory is
to be created
GeneralCLFCException
- If random directory creation failspublic void transferFile(java.lang.String local, java.lang.String remote) throws GeneralCLFCException
transferFile
in interface CmdLineExecutor
local
- Path to standard input source file on local machineremote
- Path to standard input destination file on target machine
GeneralCLFCException
- If file transfer is unsuccessfulpublic void removeDir(java.lang.String dir) throws GeneralCLFCException
removeDir
in interface CmdLineExecutor
dir
- Path to the file/folder to be removed on target machine
GeneralCLFCException
- If delete operation is unsuccessfulpublic char getOSSeparator() throws RemoteConnectException
getOSSeparator
in interface CmdLineExecutor
RemoteConnectException
- 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 CmdLineExecutor
enc
- encoding to be used
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |