org.eclipse.rse.subsystems.shells.core.model
Class SimpleCommandOperation
java.lang.Object
org.eclipse.rse.subsystems.shells.core.model.SimpleCommandOperation
public class SimpleCommandOperation
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_subsystem
protected IRemoteCmdSubSystem _subsystem
_workingDirectory
protected IRemoteFile _workingDirectory
_cmdShell
protected IRemoteCommandShell _cmdShell
_envVars
protected java.util.List _envVars
_outputLineIndex
protected int _outputLineIndex
_runAsShell
protected boolean _runAsShell
SimpleCommandOperation
public SimpleCommandOperation(IRemoteCmdSubSystem subsystem,
IRemoteFile workingDirectory,
boolean runAsShell)
getCommandShell
public IRemoteCommandShell getCommandShell()
setEnvironmentVariable
public void setEnvironmentVariable(java.lang.String name,
java.lang.String value)
setEnvironmentVariables
public void setEnvironmentVariables(java.lang.String[] names,
java.lang.String[] values)
setEnvironmentVariables
public void setEnvironmentVariables(java.lang.String[] vars)
getEnvironmentVariables
public java.lang.String[] getEnvironmentVariables()
runCommand
public void runCommand(java.lang.String command,
boolean exitShell)
throws java.lang.Exception
- Run a command
- Parameters:
command
- the command to runexitShell
- indicates whether to exit the shell after running the command
- Throws:
java.lang.Exception
runCommandInShell
public void runCommandInShell(java.lang.String exports,
java.lang.String command,
boolean exitShell)
throws java.lang.Exception
- Launch a shell with the specified exports and command
- Parameters:
exports
- the command to initialize the shell environmentcommand
- the command to runexitShell
- indicates whether to exit the shell after running the command
- Throws:
java.lang.Exception
removeShell
public void removeShell()
exitShell
public void exitShell()
putInput
public void putInput(java.lang.String input)
throws java.lang.Exception
- Throws:
java.lang.Exception
isActive
public boolean isActive()
hasMoreOutput
protected boolean hasMoreOutput()
cancelCommand
public void cancelCommand()
throws java.lang.Exception
- Throws:
java.lang.Exception
readLine
public java.lang.String readLine(boolean waitForOutput)
Copyright (c) IBM Corporation and others 2000, 2010. All Rights Reserved.