1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-06 00:25:25 +02:00
cdt/rse/doc/org.eclipse.rse.doc.isv/guide/Artifacts.html

231 lines
No EOL
16 KiB
HTML
Executable file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2002, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<link rel="stylesheet" type="text/css" HREF="../book.css">
<title>RSE Artifacts</title>
</head>
<body>
<h1>Remote System Explorer Artifacts</h1>
<p>With the RSE, you can create and manipulate the following artifacts, which we introduce here:</p>
<ul>
<li><A href="#Hosts">Hosts</A></li>
<li><A href="#profiles">Profiles</A></li>
<li><A href="#subsystems">Subsystems, created from subsystem configurations</A></li>
<li><A href="#connectorservices">Connector Services, managed by connector service managers</A></li>
<li><A href="#filters">Filters and filter strings</A></li>
<li><A href="#filterpools">Filter pools</A></li>
<li><A href="#Preferences">Preferences</A></li>
<li><A href="#Registry">System Registry</A></li>
</ul>
<p>All the classes and interfaces mentioned here are defined in the <samp>org.eclipse.rse.core</samp> plugin.
<h2><A name="Hosts">Hosts</A></h2>
<p>
The RSE's <A href="view_RS.gif">Remote Systems view</A> shows all existing <b>Hosts</b> to remote systems.
Hosts are objects that are persisted, containing the information needed to access a particular remote host.
The view contains a prompt to create new Hosts, and pop-up menu actions to rename, copy, delete, and reorder existing Hosts.
</p>
<p>
Hosts contain attributes, or data, that is saved between sessions of the workbench. These attributes are
the host name, the remote system's host name and system type, an optional description, and a user Id that is
used by default by each subordinate subsystem, at host time.
Underneath, all Hosts are stored in profiles by an registered persistence provider.
</p>
<h2><A name="profiles">Profiles</A></h2>
<p>
To facilitate sharing Hosts are owned by <b>Profiles</b>.
In 1.0 these were simply folders in the RemoteSystemsConnections
project. With the introduction of persistence providers in 2.0, profiles
can now be persisted in multiple forms - including the 1.0 scheme.
It is our intention to have RSE allow for the sharing of profiles by exporting to and importing from
the file system or from projects in a future release.
</p>
<p>
Internally profiles are realized as
SystemProfile objects, managed by the SystemProfileManager.
For each profile there is also a SystemHostPool object
created to manage the Hosts within that profile. There are menu actions for the
user to create and manage profiles. The collective of all Hosts of all <b><I>active</I> profiles</b> are shown in the
Remote Systems view,
and the user can easily decide which profiles are active using the <A href="preference_activeProfiles.gif">local pulldown menu</A> of the Remote Systems view.
The list of profiles currently active is stored locally on each user's workstation, and not shared by teams.
By default, there exists a profile named <code>Team</code>, and a profile with a name unique to this user. When the first
host is created the user is asked to supply this unique name, which defaults to the hostname of their
workstation. Whenever a new host is created, the user is prompted for an active profile to contain the new
host. Both default profiles are active initially, so all Hosts from each are shown. There is a preferences
setting to show the host names qualified by their profile name.
</p>
<!-- TODO
<p>
After synchronizing the RemoteSystemsConnections
project with a team repository, using the RSE <A href="plugin/view_Team.gif">team view</A>, all profiles of all members of
the team will exist in the user's workspace, and hence
all the Hosts created by all the team members. However, only the two default profiles are active, so the Hosts
in the other profiles are not seen unless the user explicitly makes another profile active. This design allows
for:
</p>
<ol>
<li>Team-shared Hosts (created in the Team profile or any profile all team members make active)
<li>User-private Hosts (created in their own profile or any profile not active by default)
<li>User-roaming, whereby a user uses a different workstation than usual,
and then synchronizes with the team repository and sets their profile to be active.
</ol>
-->
<!-- TODO rework
As an aside, user IDs and passwords are not shared with the team repository, but rather stored only locally per
workstation.
-->
<h2><A name="subsystems">Subsystems and subsystem configurations</A></h2>
<p>
When you expand a host, any tools registered with the Remote System Explorer are shown under the host.
These tools are referred to as <b>subsystems</b>. The tool provider registers a <b>subsystem configuration</b>
class via an RSE <A href="plugin/subsystem.html">extension point</A>, and whenever a new host is created, the configuration
is asked to create a new subsystem object for that host. This subsystem is responsible for communicating with the remote host, and
exposing artifacts and actions for working with remote resources. The subsystem configuration can elect not to
supply a subsystem for a given host if it does not support the system type of that host
</p>
<p>
RSE supplies two subsystem configurations that supply common subsystems for all Hosts:
<ol>
<li>Files. The subsystems created by this factory access the folders and files of the remote system,
and allow users to explore and manipulate those folders and files. Editing support for remote source files is also included. For programmers, the subsystems also supply common APIs and user interface actions, wizards,
dialogs, and widgets for easy access to the remote file system for a given host. These APIs are
typically used when coding actions that appear in the pop-up menu for selected remote objects, but might
also be of value when writing any view, editor, or action that needs access to a remote file system.
<li>Commands. The subsystems created by this factory access the command shell of the remote system and
allow users to predefine commands, and subsequently run them remotely. The commands subsystems are hidden
subsystems, not shown when you expand the host. However, they are used by any code needing to run
remote commands. There is also a Remote Shell view supplied that logs all commands and allows users to
enter a command to be run remotely. The commands all execute within the same shell, and users
can launch additional shells for the same host.
</ol>
<p>
Each subsystem can have a unique user ID, which if not set is inherited from its host,
which in turn if not set is inherited from the
user ID preferences setting for the appropriate system type.
</p>
<h2><A name="systems">Connector services and their managers</A></h2>
<p>While not seen by the user, subsystem objects are required to return a <b>connectorservice</b> object via the
<A href="../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html#getConnectorService()">getConnectorService()</A> method.
A connectorService object is an object implementing the <A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html">IConnectorService</A> interface.
A connectorService object manages the live host to the remote system, and supports
lifecycle methods for that host such as
<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#connect(org.eclipse.core.runtime.IProgressMonitor)">connect</A>,
<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#disconnect()">disconnect</A>, and
<A href="../reference/api/org/eclipse/rse/core/subsystems/IConnectorService.html#isConnected()">isConnected</A>.
The communication layer for that host is entirely the programmer's responsibility, and might use sockets, JDBC, HTTP or
SOAP. It is up the provider of the subsystem factory to author their own communication layer; the framework
only dictates the handful of methods in IConnectorService, that the RSE UI depends upon. The framework supplies a base
system class that is easily extended.
</p>
<p>It may be the case that multiple subsystems, each from a different subsystem configuration, share the same live
host for a given host object. To enable this, the framework supplies a base
<b>connector service manager</b> <A href="../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorServiceManager.html">class</A>
that can be used to manage a single shared connector service object across multiple subsystems. It uses a hashtable to store and
return the connector service objects, keyed by a subsystem interface that all subsystems sharing the same connector service object
are to implement. The subclass of the base connector service manager class supplies that interface. Further, the subclass
must also implement the method for instantiating new instances of the connector service class, when no instance is found
in the hashtable.
</p>
<p>
It is possible to author a subsystem configuration whose subsystems simply use the same connector service object as that used by
the RSE-supplied subsystems. You might do this if the subsystem configuration uses only the RSE-supplied APIs for
accessing remote objects, in which case there is no need for a unique communication layer. By sharing the
same connector service object, it prevents the user from being prompted to signon multiple times. To do this, simply access
any RSE-supplied subsystem for a given host, and ask for its
<A href="../reference/api/org/eclipse/rse/core/subsystems/ISubSystem.html#getConnectorServiceManager()">connector service manager</A>
in your own subsystem's <A href="../reference/api/org/eclipse/rse/core/subsystems/AbstractConnectorService.html#getConnectorServiceManager()">getConnectorServiceManager</A> method.
</p>
<h2><A name="filters">Filters</A></h2>
<p>
When a subsystem is expanded, users usually see <b>filters</b>. Since subsystems typically list remote artifacts,
it is typical that a mechanism is needed to allow users to define which artifacts they wish to see, with some
form of filtering criteria. Filters are this mechanism. The filter support is fully supplied by the RSE framework.
A filter is simply a <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilter.html">ISystemFilter</A>
object containing a name and a collection of <b>filter strings</b>. Filter strings are just strings, which
the subsystem is required to interpret. When a user expands a filter, the owning subsystem is asked to resolve
the filter strings within the filter. The subsystem typically interprets each filter string as some form of
filtering pattern, and returns a list of remote artifacts matching one or more of the filter string patterns in
the filter. For example, file subsystems expect each filter string to represent a folder, and a file name pattern. Then, all files in the folder, matching the name pattern, are returned. The subsystem supplies the user interface the
you use to create and change filter strings, so it is responsible for defining what the filter strings
look like and for subsequently resolving those filter strings on a filter expansion. A default user interface for
the filter string prompt is supplied, but it is a simple entry field.
</p>
<p>
It is possible to author a subsystem that does not support filters, if this is desired.
</p>
<h2><A name="filterpools">Filter Pools</A></h2>
<p>
Subsystems do not actually "own" filters. Since each host has unique subsystems, if each subsystem owned its
own filters then filters could not be shared across Hosts, which is sometimes desirable. Instead, filters are
actually contained within <b>filter pools</b>. Filter pools are simply
<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPool.html">ISystemFilterPool</A>
objects which have a name and a collection of filters.
Filter pools are owned by subsystem configurations, per profile. That is, each subsystem configuration will contain filter pools
scoped by profile. Each such configuration plus profile grouping is known internally as a
<A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolManager.html">filter pool manager</A>.
Subsystems contain <A href="../reference/api/org/eclipse/rse/core/filters/ISystemFilterPoolReference.html">references</A>
to filter pools. By default, each subsystem configuration automatically creates one filter pool
for each profile, named the "xxx Filter Pool", where "xxx" is the name of the profile. Subsystems contain references to
filter pools, so that as the filters in the pool are created, changed, deleted or re-ordered, those changes are automatically
reflected in every subsystem (and hence host) that references that filter pool. By default, subsystems are given a
reference to the default filter pool in their host's profile (for their parent subsystem configuration, so file filters
are not used in command subsystems, for example).
</p>
<p>
By default, users do not see filter pools. Instead, filters are created in the default filter pool referenced by this subsystem.
As a result, users will see the same list of filters for every host. However, users can use a preference setting to see
filter pools. In this case, when a subsystem is expanded, the users see the filter pools referenced by this subsystem.
Only then when a filter pool is expanded will the user see the filters within that filter pool. In this mode, users also
see new actions to create filter pools and to add and remove references to filter pools within a subsystem. Whenever filters
are changed by the user, this change is reflected in all subsystems that reference the parent filter pool. This design
of filter pools owned by profiles, and subsystems that reference filter pools, facilitates filter sharing:
<ol>
<li>Users can share filters across Hosts, by adding references to their parent filter pool in various subsystems.<li>Users can have filters unique to a host, by placing them in a filter pool not referenced by other subsystems.
<li>Users can have both shared and host-unique filters in a single host, by having both shared and private references
to filter pools.<li>Teams can share filters by asking each user to add a reference to the same filter pool in their Hosts. For example,
this is the default case for the default filter pool.
<li>Users can create filters that are not shared by the team, by creating their own filter pools and not asking others to
reference it.
</ol>
</p>
<h2><A name="preferences">Preferences</A></h2>
<p>
Many of the default characteristics of the Remote System Explorer view and perspective are configurable by each user
by way of the <A href="preferences.gif">Remote Systems node</A> of the <b>Preferences</b> window, accessible from the Window pull-down of the main menu.
Furthermore, many of these preferences are directly accessible from the <A
href="view_pulldown.gif">pull-down menu of the title bar for the Remote
Systems view</A>. These preferences, like all preferences, are unique to each user and not shared by the team, although they can
be exported and imported.
</p>
<h2><A name="Registry">System Registry</A></h2>
<p>The programmatic front door to all the artifacts in the RSE is the
<b>System Registry</b>, which is an object implementing
<A href="../reference/api/org/eclipse/rse/core/model/ISystemRegistry.html">ISystemRegistry</A>.
This is a singleton object that you
can access by calling the static method
<A href="../reference/api/org/eclipse/rse/core/model/SystemStartHere.html#getSystemRegistry()">getSystemRegistry()</A> in the
<A href="../reference/api/org/eclipse/rse/core/model/SystemStartHere.html">SystemStartHere</A>
class in the <samp>org.eclipse.rse.core</samp> plugin.
</p>
<p>A UI-enabled extension of the system registry is available through the
<A href="../reference/api/org/eclipse/rse/ui/model/ISystemRegistryUI.html">ISystemRegistryUI</A> interface.
This interface is available by calling the static method
<A href="../reference/api/org/eclipse/rse/ui/RSEUIPlugin.html#getTheSystemRegistryUI()">getTheSystemRegistryUI()</A> in the
<A href="../reference/api/org/eclipse/rse/ui/RSEUIPlugin.html">RSEUIPlugin</A>
class in the <samp>org.eclipse.rse.ui</samp> plugin.
</p>
</body>
</html>