RSE
Release 3.0

org.eclipse.rse.subsystems.shells.core.model
Class RemoteCommandShellOperation

java.lang.Object
  extended by org.eclipse.rse.subsystems.shells.core.model.RemoteCommandShellOperation
All Implemented Interfaces:
EventListener, ISystemResourceChangeListener, ISystemShellProvider

public abstract class RemoteCommandShellOperation
extends Object
implements ISystemResourceChangeListener, ISystemShellProvider


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)
           
 
Method Summary
 void associateProject(IProject project)
           
protected  boolean commandMatches(String outputEcho, RemoteCommandShellOperation.CommandAlias firstCommand)
           
 void finish()
           
 String getCurrentCommand()
           
 IRemoteCommandShell getRemoteCommandShell()
           
 Shell getShell()
          This method will be called to return the shell for your viewer.
abstract  void handleCommandFinished(String cmd)
           
abstract  void handleOutputChanged(String command, Object output)
           
 void handleShellFinished()
           
 boolean isActive()
          Indicates whether the command shell is active or not
 void outputUpdated()
          Called whenever output is retrieved from the host
 IRemoteCommandShell run()
           
 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

_cmdSubSystem

protected IRemoteCmdSubSystem _cmdSubSystem

_pwd

protected IRemoteFile _pwd

_shell

protected Shell _shell

_remoteCmdShell

protected IRemoteCommandShell _remoteCmdShell
Constructor Detail

RemoteCommandShellOperation

public RemoteCommandShellOperation(Shell shell,
                                   IRemoteCmdSubSystem cmdSubSystem,
                                   IRemoteFile pwd)
Method Detail

setWorkingDirectory

public void setWorkingDirectory(IRemoteFile pwd)

run

public IRemoteCommandShell run()

getRemoteCommandShell

public IRemoteCommandShell getRemoteCommandShell()

associateProject

public void associateProject(IProject project)

finish

public void finish()

getCurrentCommand

public String getCurrentCommand()

sendCommand

public void sendCommand(String cmd)
Send a command to the running command shell.

Parameters:
cmd - the command to run in the shell

sendInput

public void sendInput(String input)
Send input to the running command shell. The input is treated as input to a running program - rather than a new command. As such, no echos are used and it's not logged for completion.

Parameters:
input - the input to send to the running program

getShell

public Shell getShell()
Description copied from interface: ISystemShellProvider
This method will be called to return the shell for your viewer.

Specified by:
getShell in interface ISystemShellProvider
Returns:
the shell for your viewer.

isActive

public boolean isActive()
Indicates whether the command shell is active or not

Returns:
true if the command shell is running

systemResourceChanged

public void systemResourceChanged(ISystemResourceChangeEvent event)
Description copied from interface: ISystemResourceChangeListener
This is the method in your class that will be called when a system resource changes.

Specified by:
systemResourceChanged in interface ISystemResourceChangeListener
See Also:
ISystemResourceChangeEvent

outputUpdated

public void outputUpdated()
Called whenever output is retrieved from the host


commandMatches

protected boolean commandMatches(String outputEcho,
                                 RemoteCommandShellOperation.CommandAlias firstCommand)

handleShellFinished

public void handleShellFinished()

handleCommandFinished

public abstract void handleCommandFinished(String cmd)

handleOutputChanged

public abstract void handleOutputChanged(String command,
                                         Object output)

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.