RSE
Release 1.0

org.eclipse.rse.services.ssh.shell
Class SshShellService

java.lang.Object
  extended byorg.eclipse.rse.services.ssh.shell.SshShellService
All Implemented Interfaces:
IService, IShellService, ISshService

public class SshShellService
extends Object
implements ISshService, IShellService

A Shell Services for ssh. Adapted from LocalShellService.


Constructor Summary
SshShellService(ISshSessionProvider sessionProvider)
           
 
Method Summary
 String getDescription()
           
 String[] getHostEnvironment()
          Return an array of environment variables that describe the environment on the host.
 SystemMessage getMessage(String messageID)
           
 String getName()
           
 void initService(IProgressMonitor monitor)
           
 IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String[] environment)
          Launch a new shell in the specified directory
 IHostShell launchShell(IProgressMonitor monitor, String initialWorkingDirectory, String encoding, String[] environment)
          Launch a new shell in the specified directory
 IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String[] environment)
          Run a command in it's own shell
 IHostShell runCommand(IProgressMonitor monitor, String initialWorkingDirectory, String command, String encoding, String[] environment)
          Run a command in it's own shell
 void uninitService(IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshShellService

public SshShellService(ISshSessionProvider sessionProvider)
Method Detail

launchShell

public IHostShell launchShell(IProgressMonitor monitor,
                              String initialWorkingDirectory,
                              String[] environment)
Description copied from interface: IShellService
Launch a new shell in the specified directory

Specified by:
launchShell in interface IShellService
Parameters:
monitor -
initialWorkingDirectory -
environment - Array of environment variable Strings of the form "var=text"
Returns:
the shell object

launchShell

public IHostShell launchShell(IProgressMonitor monitor,
                              String initialWorkingDirectory,
                              String encoding,
                              String[] environment)
Description copied from interface: IShellService
Launch a new shell in the specified directory

Specified by:
launchShell in interface IShellService
Parameters:
monitor -
initialWorkingDirectory -
encoding -
environment - Array of environment variable Strings of the form "var=text"
Returns:
the shell object

runCommand

public IHostShell runCommand(IProgressMonitor monitor,
                             String initialWorkingDirectory,
                             String command,
                             String[] environment)
Description copied from interface: IShellService
Run a command in it's own shell

Specified by:
runCommand in interface IShellService
Parameters:
monitor -
initialWorkingDirectory -
command -
environment - Array of environment variable Strings of the form "var=text"
Returns:
the shell object for getting output and error streams

runCommand

public IHostShell runCommand(IProgressMonitor monitor,
                             String initialWorkingDirectory,
                             String command,
                             String encoding,
                             String[] environment)
Description copied from interface: IShellService
Run a command in it's own shell

Specified by:
runCommand in interface IShellService
Parameters:
monitor -
initialWorkingDirectory -
command -
encoding -
environment - Array of environment variable Strings of the form "var=text"
Returns:
the shell object for getting output and error streams

getHostEnvironment

public String[] getHostEnvironment()
Description copied from interface: IShellService
Return an array of environment variables that describe the environment on the host. Each String returned is of the format "var=text": Everything up to the first equals sign is the name of the given environment variable, everything after the equals sign is its contents.

Specified by:
getHostEnvironment in interface IShellService
Returns:
Array of environment variable Strings of the form "var=text"

getName

public String getName()
Specified by:
getName in interface IService

getDescription

public String getDescription()
Specified by:
getDescription in interface IService

initService

public void initService(IProgressMonitor monitor)
Specified by:
initService in interface IService

uninitService

public void uninitService(IProgressMonitor monitor)
Specified by:
uninitService in interface IService

getMessage

public SystemMessage getMessage(String messageID)
Specified by:
getMessage in interface IService

RSE
Release 1.0

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