|
RSE Release 3.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.subsystems.shells.core.model.RemoteCommandShellOperation
public abstract class RemoteCommandShellOperation
Base class for command shell wrappers that use echo markers to parse command finish. This abstract class can be extended to provide a command shell wrapper. When running a shell, commands can be piped to the shell via the sendCommand() method. Echo commands are used to determine when each command is complete. Whenever a command completes, the handleCommandFinished() method is called.
| Nested Class Summary | |
|---|---|
protected class |
RemoteCommandShellOperation.CommandAlias
|
| Field Summary | |
|---|---|
protected IRemoteCmdSubSystem |
_cmdSubSystem
|
protected IRemoteFile |
_pwd
|
protected IRemoteCommandShell |
_remoteCmdShell
|
protected Shell |
_shell
|
| Constructor Summary | |
|---|---|
RemoteCommandShellOperation(Shell shell,
IRemoteCmdSubSystem cmdSubSystem,
IRemoteFile pwd)
Constructor |
|
| Method Summary | |
|---|---|
void |
associateProject(IProject project)
|
protected boolean |
commandMatches(String outputEcho,
RemoteCommandShellOperation.CommandAlias firstCommand)
|
void |
finish()
Called when a shell is complete. |
String |
getCurrentCommand()
|
IRemoteCommandShell |
getRemoteCommandShell()
|
Shell |
getShell()
This method will be called to return the shell for your viewer. |
abstract void |
handleCommandFinished(String cmd)
Called (on the main Thread) when the specified command is complete |
abstract void |
handleOutputChanged(String command,
Object output)
Called (on the main Thread) whenever output has changed |
void |
handleShellFinished()
Called (on the main Thread) when the shell is complete |
boolean |
isActive()
Indicates whether the command shell is active or not |
void |
outputUpdated()
Called (on the main Thread) whenever output is retrieved from the host |
IRemoteCommandShell |
run()
Launches a new remote shell |
void |
sendCommand(String cmd)
Send a command to the running command shell. |
void |
sendInput(String input)
Send input to the running command shell. |
void |
setWorkingDirectory(IRemoteFile pwd)
|
void |
systemResourceChanged(ISystemResourceChangeEvent event)
This is the method in your class that will be called when a system resource changes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected IRemoteCmdSubSystem _cmdSubSystem
protected IRemoteFile _pwd
protected Shell _shell
protected IRemoteCommandShell _remoteCmdShell
| Constructor Detail |
|---|
public RemoteCommandShellOperation(Shell shell,
IRemoteCmdSubSystem cmdSubSystem,
IRemoteFile pwd)
| Method Detail |
|---|
public void setWorkingDirectory(IRemoteFile pwd)
public IRemoteCommandShell run()
public IRemoteCommandShell getRemoteCommandShell()
public void associateProject(IProject project)
public void finish()
public String getCurrentCommand()
public void sendCommand(String cmd)
cmd - the command to run in the shellpublic void sendInput(String input)
input - the input to send to the running programpublic Shell getShell()
ISystemShellProvider
getShell in interface ISystemShellProviderpublic boolean isActive()
public void systemResourceChanged(ISystemResourceChangeEvent event)
ISystemResourceChangeListener
systemResourceChanged in interface ISystemResourceChangeListenerISystemResourceChangeEventpublic void outputUpdated()
protected boolean commandMatches(String outputEcho,
RemoteCommandShellOperation.CommandAlias firstCommand)
public void handleShellFinished()
public abstract void handleCommandFinished(String cmd)
cmd - the completed command
public abstract void handleOutputChanged(String command,
Object output)
command - the current commandoutput - the new output object
|
RSE Release 3.4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||