1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 07:05:24 +02:00

[170910][api] Add API for Stream-based shells and terminals in RSE

This commit is contained in:
Martin Oberhuber 2008-04-11 18:15:32 +00:00
parent f102eba88c
commit 6bb3eeaebb

View file

@ -0,0 +1,72 @@
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Martin Oberhuber (Wind River)">
<meta name="Copyright" content="Copyright (c) 2008 Wind River Systems, Inc. and others.">
<meta name="License" content="Made available under the terms of the Eclipse Public License v1.0.">
<title>Package-level Javadoc</title>
</head>
<body>
Application programming interface for the RSE Base Shell and Terminal Services.
<p>
<strong>EXPERIMENTAL</strong>. This class or interface has been added as
part of a work in progress. There is no guarantee that this API will work or
that it will remain the same. Please do not use this API without consulting
with the <a href="http://www.eclipse.org/dsdp/tm/">Target Management</a>
team.
</p>
<h2>
Package Specification</h2>
<p>
The RSE Terminal Services packages provides interfaces and basic utility classes
for shell or terminal connections. The classes in this package are especially designed
to be extendable by means of the <b>Decorator</b> pattern as well as the <b>Adapter</b>
pattern:
<ul>
<li><code><a href="IBaseShell.html">IBaseShell</a></code>
is the basic interface for communicating with a (potentially remote) process
through a channel supporting Streams. The Interface is modeled after the
<code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html">java.lang.Process</a></code>
class, but provides some nice enhancements such as a timeout for the
<code>waitFor()</code> method, as well as an <code>isActive()</code>
method.</li>
<li><code><a href="ProcessBaseShell.html">ProcessBaseShell</a></code>
is a sample class implementing IBaseShell, that wraps an existing
<code><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html">java.lang.Process</a></code>
object in the IBaseShell interface for easier consumption.</li>
<li><code><a href="ITerminalShell.html">ITerminalShell</a></code>
extends IBaseShell, adding methods specific to the presentation of the data
transferred from the (remote) process: it provides for getDefaultEncoding(),
getPtyType(), isLocalEcho() as well as setTerminalSize() methods.</li>
<li><code><a href="AbstractTerminalShell.html">AbstractTerminalShell</a></code>
is an abstract base class that implementers of ITerminalShell must extend.
It provides default implementations of all methods where possible, and
ensures that future evolving of the ITerminalShell interface
can be done without breaking binary compatibility with extenders implementing it.</li>
<li><code><a href="BaseShellDecorator.html">BaseShellDecorator</a></code> and
<code><a href="">TerminalShellDecorator</a></code> abstract base
classes should be used when clients want to add functionality by decorating
an existing IBaseShell or ITerminalShell object they have. Again, extending
these not only saves the extender typing default delegation methods, but also
ensures that they remain binary compatible in case the interfaces evolve.</li>
<li><code><a href="ITerminalService.html">ITerminalService</a></code>
is the RSE Service Interface, and currently only
provides one factory method <code>launchTerminal()</code> for creating
a new Terminal Connection.
<code><a href="">AbstractTerminalService</a></code> must be used as base
class by extenders who wish to implement the ITerminalService, in order to ensure
binary compatibility in case the interface evolves - even though
the AbstractTerminalService is currently empty.</li>
</ul>
The classes and interfaces in this package are designed to have only minimal
dependency into Eclipse core APIs, such that Services can eventually be re-used in
environments outside Eclipse. Especially
<code><a href="IBaseShell.html">IBaseShell</a></code>, along with
<code><a href="ProcessBaseShell.html">ProcessBaseShell</a></code> and
<code><a href="BaseShellDecorator.html">BaseShellDecorator</a></code> are usable in
any environment, provided that mock objects are provided for Eclipse
IAdaptable and PlatformObject.
</p>
</body>
</html>