RSE
Release 3.3

org.eclipse.rse.services.terminals
Interface ITerminalShell

All Superinterfaces:
IAdaptable, IBaseShell
All Known Implementing Classes:
AbstractTerminalShell, TerminalShellDecorator

public interface ITerminalShell
extends IBaseShell

Interface representing a terminal connection through Streams. Rather than the underlying IBaseShell, an ITerminalShell connection adds methods that describe the presentation of the data transmitted over its Streams, as well as methods like setTerminalSize(int, int) to change the behavior of the presentation of this data. An instance of ITerminalShell is typically obtained from an ITerminalService. In RSE, a single remote shell instance can only either support the streamed ITerminalShell interface or the listener-based IHostShell interface, but not both. Note, though, that with the capabilities that an ITerminalShell has, it is always possible to adapt it to an IHostShell; this is typically not possible the other way round. We therefore recommend extenders of RSE that used to subclass IHostShell to move to the new IBaseShell / ITerminalShell APIs eventually, if they can.

Since:
org.eclipse.rse.services 3.1
See Also:
IBaseShell, ITerminalService, AbstractTerminalShell, TerminalShellDecorator

Method Summary
 String getDefaultEncoding()
          Return the default encoding that the terminal service had specified when creating this terminal connection, or that's known from the remote side to be expected.
 String getPtyType()
          Get the Terminal Type that's expected on this connection.
 boolean isLocalEcho()
          Test if local echo is needed on this terminal connection.
 void setTerminalSize(int newWidth, int newHeight)
          Notify the remote site that the size of the terminal has changed.
 
Methods inherited from interface org.eclipse.rse.services.terminals.IBaseShell
exit, exitValue, getErrorStream, getInputStream, getOutputStream, isActive, waitFor
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getPtyType

String getPtyType()
Get the Terminal Type that's expected on this connection. The terminal type may be specified by the client when constructing a concrete instance of an ITerminalShell, or a remote side may actually expect a particular terminal type to be present.

Returns:
the terminal type expected by the remote side to properly render the Streams associated with this Terminal, or null if the ITerminalShell does not know what kind of Terminal Type is expected.

getDefaultEncoding

String getDefaultEncoding()
Return the default encoding that the terminal service had specified when creating this terminal connection, or that's known from the remote side to be expected. This is not necessarily known or accurate, and may be null. TODO I'm not actually sure if this method is a good idea. Perhaps we should use the IAdaptable mechanism for dealing with encodings, since our shells basically deal with binary data only.

Returns:
the specified default encoding, or null if unknown.

setTerminalSize

void setTerminalSize(int newWidth,
                     int newHeight)
Notify the remote site that the size of the terminal has changed. There is no guarantee that the remote side is actually capable of changing the Terminal size.

Parameters:
newWidth -
newHeight -

isLocalEcho

boolean isLocalEcho()
Test if local echo is needed on this terminal connection. Clients are expected to return false if in doubt.

Returns:
true if a local echo is needed.

RSE
Release 3.3

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