|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IShellService
IShellService is an abstraction for running shells and shell commands.
Method Summary | |
---|---|
String[] |
getHostEnvironment()
Return an array of environment variables that describe the environment on the remote system. |
IHostShell |
launchShell(String initialWorkingDirectory,
String[] environment,
IProgressMonitor monitor)
Launch a new shell in the specified directory with a default encoding. |
IHostShell |
launchShell(String initialWorkingDirectory,
String encoding,
String[] environment,
IProgressMonitor monitor)
Launch a new shell in the specified directory. |
IHostShell |
runCommand(String initialWorkingDirectory,
String command,
String[] environment,
IProgressMonitor monitor)
Run a single command in it's own shell with a default encoding. |
IHostShell |
runCommand(String initialWorkingDirectory,
String command,
String encoding,
String[] environment,
IProgressMonitor monitor)
Run a single command in it's own shell. |
Methods inherited from interface org.eclipse.rse.services.IService |
---|
getDescription, getName, initService, uninitService |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Method Detail |
---|
IHostShell launchShell(String initialWorkingDirectory, String[] environment, IProgressMonitor monitor) throws SystemMessageException
null
as encoding
into launchShell(String, String, String[], IProgressMonitor)
.
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.IHostShell launchShell(String initialWorkingDirectory, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException
initialWorkingDirectory
- initial working directory or empty String
("") if not relevant. The remote shell will launch in a
directory of its own choice in that case (typically a user's
home directory).encoding
- Stream encoding to use, or null
to fall
back to a default encoding. The Shell Service will make
efforts to determine a proper default encoding on the remote
side but this is not guaranteed to be correct.environment
- Array of environment variable Strings of the form
"var=text". Since not all shell implementations support the
passing of environment variables, there is no guarantee that
the created shell will actually have the specified environment
set.monitor
- Progress Monitor for monitoring and cancellation
IHostShell.isActive()
returns false
on the created Shell object.
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.IHostShell runCommand(String initialWorkingDirectory, String command, String[] environment, IProgressMonitor monitor) throws SystemMessageException
null
as encoding
into
runCommand(String, String, String, String[], IProgressMonitor)
.
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.IHostShell runCommand(String initialWorkingDirectory, String command, String encoding, String[] environment, IProgressMonitor monitor) throws SystemMessageException
launchShell(String, String, String[], IProgressMonitor)
but
immediately executes a specified command rather than just opening a
shell. There is no guarantee that after the host shell will accept any
subsequent commands after the initial command has been executed; there
is, however, also no guarantee that the host shell will terminate the
connection automatically. Clients need to call IHostShell.exit()
in case the shell remains active after the initial command is completed.
initialWorkingDirectory
- initial working directory or empty String
("") if not relevant. The remote command will launch in a
directory of its own choice in that case (typically a user's
home directory).command
- initial command to send to the remote side.encoding
- Stream encoding to use, or null
to fall
back to a default encoding. The Shell Service will make
efforts to determine a proper default encoding on the remote
side but this is not guaranteed to be correct.environment
- Array of environment variable Strings of the form
"var=text". Since not all shell implementations support the
passing of environment variables, there is no guarantee that
the created shell will actually have the specified environment
set.monitor
- Progress Monitor for monitoring and cancellation
IHostShell.isActive()
returns
false
on the created Shell object.
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.String[] getHostEnvironment() throws SystemMessageException
SystemMessageException
- in case an error occurred or the user
chose to cancel the operation via the progress monitor.
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |