RSE
Release 1.0

org.eclipse.rse.subsystems.shells.ssh
Class SshServiceCommandShell

java.lang.Object
  extended byorg.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCommandShell
      extended byorg.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell
          extended byorg.eclipse.rse.subsystems.shells.ssh.SshServiceCommandShell
All Implemented Interfaces:
IAdaptable, IHostShellOutputListener, IRemoteCommandShell, IServiceCommandShell, ISystemOutputRemoteTypes

public class SshServiceCommandShell
extends ServiceCommandShell
implements ISystemOutputRemoteTypes


Field Summary
 
Fields inherited from class org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell
_hostShell, _lastRefreshJob
 
Fields inherited from class org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCommandShell
_cmdHistory, _cmdSubSystem, _cwd, _fileSubSystem, _id, _name, _output, _project, _type
 
Fields inherited from interface org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes
TYPE_COMMAND, TYPE_DIRECTORY, TYPE_ENVVAR, TYPE_ENVVAR_LIBPATH, TYPE_ENVVAR_PATH, TYPE_ERROR, TYPE_FILE, TYPE_GREP, TYPE_INFORMATIONAL, TYPE_PROCESS, TYPE_PROMPT, TYPE_WARNING, TYPECATEGORY
 
Constructor Summary
SshServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
           
 
Method Summary
 Object getContext()
          Get the current context for this command shell.
protected  String getPromptCommand()
          Return the prompt command, such that lines ending with the prompt command can be removed from output.
 void shellOutputChanged(IHostShellChangeEvent event)
           
 void writeToShell(String cmd)
           
 
Methods inherited from class org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell
getCandidateCommands, getHostShell, getTitle, isActive
 
Methods inherited from class org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCommandShell
addOutput, associateProject, getAdapter, getAssociatedProject, getCommandSubSystem, getFileSubSystem, getHistory, getId, getIndexOf, getName, getOutputAt, getRoots, getSize, getType, getWorkingDirectory, isWindows, listOutput, removeOutput, removeOutput, setName, setType, setWorkingDirectory, updateHistory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell
addOutput, associateProject, getAssociatedProject, getCommandSubSystem, getFileSubSystem, getHistory, getId, getIndexOf, getName, getOutputAt, getSize, getType, listOutput, removeOutput, removeOutput, updateHistory
 

Constructor Detail

SshServiceCommandShell

public SshServiceCommandShell(IRemoteCmdSubSystem cmdSS,
                              IHostShell hostShell)
Method Detail

getContext

public Object getContext()
Description copied from interface: IRemoteCommandShell
Get the current context for this command shell. In the case of a unix shell, this will be the working directory as an

Specified by:
getContext in interface IRemoteCommandShell
Returns:
the current working directory

shellOutputChanged

public void shellOutputChanged(IHostShellChangeEvent event)
Specified by:
shellOutputChanged in interface IHostShellOutputListener
Overrides:
shellOutputChanged in class ServiceCommandShell

getPromptCommand

protected String getPromptCommand()
Return the prompt command, such that lines ending with the prompt command can be removed from output. Should be overridden in case the IHostShell used for this service is not an SshHostShell.

Returns:
String promptCommand

writeToShell

public void writeToShell(String cmd)
Specified by:
writeToShell in interface IServiceCommandShell
Overrides:
writeToShell in class ServiceCommandShell

RSE
Release 1.0

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