Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rse/plugins/org.eclipse.rse.subsystems.processes.core')
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF20
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties16
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties13
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java68
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java47
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java96
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java76
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java112
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java34
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties19
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java157
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java286
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java202
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java212
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java26
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java51
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java208
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java81
23 files changed, 0 insertions, 1816 deletions
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath
deleted file mode 100644
index 065ac06e1..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore
deleted file mode 100644
index c5e82d745..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project b/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project
deleted file mode 100644
index 7651403d0..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.processes.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 63ecd251d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,20 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.processes.core;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.rse.subsystems.processes.core,
- org.eclipse.rse.subsystems.processes.core.subsystem,
- org.eclipse.rse.subsystems.processes.core.subsystem.impl,
- org.eclipse.rse.subsystems.processes.servicesubsystem
-art: true
-Require-Bundle: org.eclipse.rse.services,
- org.eclipse.core.runtime,
- org.eclipse.swt,
- org.eclipse.ui,
- org.eclipse.rse.core,
- org.eclipse.rse.ui
-Bundle-Activator: org.eclipse.rse.subsystems.processes.core.Activator
-Eclipse-LazyStart: true
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html b/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties
deleted file mode 100644
index 737bcabbe..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2001, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- .,\
- plugin.properties
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties
deleted file mode 100644
index c7956888c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2000, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-
-pluginName = RSE Processes Core
-providerName = Eclipse.org
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java
deleted file mode 100644
index 50a7cb3b7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/Activator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.processes.core", path);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java
deleted file mode 100644
index d210ce6ea..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IHostProcessToRemoteProcessAdapter.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-
-/**
- * An adapter for converting from IHostProcesses to IRemoteProcesses. An IHostProcess is an abstract representation of a
- * process on a host machine, whereas an IRemoteProcess also contains information that is RSE specific.
- * @author mjberger
- *
- */
-public interface IHostProcessToRemoteProcessAdapter
-{
- /**
- * Convert a set of IHostProcess objects to IRemoteProcess objects.
- * @param context An object representing some contextual information for the processes
- * @param parent The parent process object
- * @param nodes The set of IHostProcess objects to convert
- * @return the converted objects
- */
- public IRemoteProcess[] convertToRemoteProcesses(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess[] nodes);
-
- /**
- * Convert a single IHostProcess object to an IRemoteProcess object.
- * @param context An object representing some contextual information for the process
- * @param parent The parent process object
- * @param node The IHostProcess object to convert
- * @return the converted object
- */
- public IRemoteProcess convertToRemoteProcess(IRemoteProcessContext context, IRemoteProcess parent, IHostProcess node);
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java
deleted file mode 100644
index 88f121d91..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcess.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-
-
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-
-/**
- *
- * @author mjberger
- *
- * This interface represents a handle to a remote process object
- * It differs from an IHostProcess in that it contains extra, RSE-specific
- * information.
- * <ul>
- * <li>This is an interface, so there are no static methods
- * <li>This are no action methods, only read methods. The action methods
- * such as kill are found in the process subsystem interface.
- * All remote commands/actions are funnelled through subsystems in this
- * remote system framework.
- * <li>Similarly, you do not construct these objects directly. Rather, there are
- * factory methods in IRemoteProcessSubSystem to create them.
- * </ul>
- * <p>
- */
-public interface IRemoteProcess extends IHostProcess, IAdaptable
-{
-
- /**
- * Get parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
-
- /**
- * Return the connection this remote process is from.
- */
- public IHost getSystemConnection();
-
- /**
- * Return the filter string resolved to get this object
- */
- public IHostProcessFilter getFilterString();
-
- /**
- * Set the filter string resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString);
-
- /**
- * Get fully qualified connection and folder name of associated object in /proc filesystem: profile.connection/path/procfolder.
- * Note the separator character between the profile name and the connection name is always '.'
- * Note the separator character between the connection and qualified-folder is always ':'
- */
- public String getAbsolutePathPlusConnection();
-
- /**
- * Get the parent remote process of this process
- */
- public IRemoteProcess getParentRemoteProcess();
-
- /**
- * Return the context associated with this remote file
- */
- public IRemoteProcessContext getContext();
-
- /**
- * Get fully qualified name of associated object in /proc filesystem: root plus path plus pid. No connection name.
- */
- public String getAbsolutePath();
-
- /**
- * Get the underlying object that this object wrappers, whether that is a
- * DataElement or an IRemoteServerProcess, or something else is implementation specific.
- */
- public Object getObject();
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java
deleted file mode 100644
index 3fb4667cb..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessContext.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-
-/**
- * This interface represents a place to hold contextual information stored within
- * each remote process object.
- * <p>
- * We store in here information that might be the same for multiple remote process objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public interface IRemoteProcessContext
-{
-
- /**
- * Get parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem();
-
- /**
- * Return the parent remote process object expanded to get this object, or null if no such parent
- */
- public IRemoteProcess getParentRemoteProcess();
-
- /**
- * Return the filter string used to resolve the list resulting in this remote object.
- */
- public IHostProcessFilter getFilterString();
-
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public IHostProcessFilter[] getAllFilterStrings();
-
- /**
- * Set parent subsystem
- */
- public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem parentSubSystem);
-
- /**
- * Set the parent remote process object expanded to get this object, or null if no such parent
- */
- public void setParentRemoteProcess(IRemoteProcess parentProcess);
-
- /**
- * Set the filter string used to resolve the list resulting in this remote object.
- */
- public void setFilterString(IHostProcessFilter filterString);
-
- /**
- * Add an additional filter string. This is called for processes in a multi-filter string
- * filter. It is called for each filter string that lists the contents of the same parent
- * path, when show subprocesses is true. It is needed to support the subsequent expansion of
- * this branch of the process tree, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(IHostProcessFilter additionalFilterString);
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java
deleted file mode 100644
index 2e367683a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystem.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-
-/**
- * The RSE subsystem for Remote Processes
- * @author mjberger
- *
- */
-public interface IRemoteProcessSubSystem extends ISubSystem
-{
-
- // ----------------------
- // HELPER METHODS...
- // ----------------------
-
- /**
- * Return parent subsystem factory, cast to a RemoteProcessSubSystemConfiguration
- */
- public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration();
-
- /**
- * Return true if names are case-sensitive. Used when doing name or type filtering
- */
- public boolean isCaseSensitive();
-
- // ----------------------
- // PROCESS METHODS...
- // ----------------------
-
- /**
- * Return a list of all processes on the remote system.
- * This version is called directly by users.
- * @param processNameFilter filter the results according to this object
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- * @return the list of all processes running on the host machine that correspond to the filter,
- * or null if there are none.
- */
- public IRemoteProcess[] listAllProcesses(IHostProcessFilter processNameFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException;
-
- /**
- * Returns root processes
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor);
-
- /**
- * Return a list of all remote child processes of the given parent process on the remote system
- * @param parent The parent process whose children to list
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Return a list of remote child processes of the given process, which match the filter.
- * @param parent The parent process whose children to list
- * @param processFilter The process filter to subset the list by, or null to return all child processes.
- * @param context A context object that will be associated with each returned process
- * @param monitor the progress monitor
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException;
-
- /**
- * Given a process, return its parent process object.
- * @param process the process to return parent of.
- */
- public IRemoteProcess getParentProcess(IRemoteProcess process);
-
- /**
- * Given a pid, return an IRemoteProcess object for it.
- * @param pid The pid of the desired process
- */
- public IRemoteProcess getRemoteProcessObject(long pid) throws SystemMessageException;
-
- /**
- * Kill the given process.
- *
- * @param process represents the object to be killed.
- * @return false if the given process doesn't exist, else true. Throws an exception if anything fails.
- */
- public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException;
-
- /**
- * Returns a list of the types of signals that can be sent to
- * a process on the remote system.
- * @return the signal types, or null if there are none, or they cannot be found.
- */
- public String[] getSignalTypes() throws SystemMessageException;
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java
deleted file mode 100644
index 7ee9fa99d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/IRemoteProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
-
-/**
- * An interface representing factories for creating RemoteProcessSubSystem objects.
- * @author mjberger
- *
- */
-public interface IRemoteProcessSubSystemConfiguration extends ISubSystemConfiguration
-{
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
deleted file mode 100644
index da33417ad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem;
-
-import org.eclipse.osgi.util.NLS;
-
-
-public class SystemProcessesCoreResources extends NLS
-{
- private static String BUNDLE_NAME = "org.eclipse.rse.subsystems.processes.core.subsystem.SystemProcessesCoreResources";
-
- // PROCESS PROPERTIES
- public static String RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL;
- public static String RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, SystemProcessesCoreResources.class);
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
deleted file mode 100644
index 1247342c7..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/SystemProcessesCoreResources.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-################################################################################
-# Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-
-RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL=All Processes
-RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL=My Processes \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java
deleted file mode 100644
index 42dd1d4aa..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessContext.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-
-import java.util.Vector;
-
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-/**
- * This class represents a place to hold contextual information stored within
- * each remote process object.
- * <p>
- * We store in here information that might be the same for multiple remote process objects,
- * in order to save memory. This way, we can merely hold a reference to a single object,
- * which itself may have numerous pieces of information helpful when processing actions
- * on a particular remote object.
- */
-public class RemoteProcessContext implements IRemoteProcessContext
-{
-
- protected IRemoteProcessSubSystem subsystem;
- protected IRemoteProcess parentProcess;
- protected IHostProcessFilter filterString;
- protected Vector allFilterStrings;
-
- /**
- * Constructor that takes all inputs.
- */
- public RemoteProcessContext(IRemoteProcessSubSystem subsystem, IRemoteProcess parentProcessObject,
- IHostProcessFilter filterString)
- {
- this.subsystem = subsystem;
- this.parentProcess = parentProcessObject;
- this.filterString = filterString;
- }
-
- /**
- * Constructor that takes no inputs.
- */
- public RemoteProcessContext()
- {
- }
- // ------------------------------------------------------------------------
- // SETTER METHODS...
- // ------------------------------------------------------------------------
- /**
- * Set the parent subsystem
- */
- public void setParentRemoteProcessSubSystem(IRemoteProcessSubSystem subsystem)
- {
- this.subsystem = subsystem;
- }
-
- /**
- * Set the parent remote process object of this process
- */
- public void setParentRemoteProcess(IRemoteProcess parentProcessObject)
- {
- this.parentProcess = parentProcessObject;
- }
-
- /**
- * Set the filter string object resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString)
- {
- this.filterString = filterString;
- allFilterStrings = null;
- }
-
- /**
- * Add an additional filter string. This is called for folders in a multi-filter string
- * filter. It is needed to support the subsequent expansion of
- * this process, so that it can filter on all the appropriate filter strings.
- */
- public void addFilterString(IHostProcessFilter additionalFilterString)
- {
- if (allFilterStrings == null)
- {
- allFilterStrings = new Vector();
- if (filterString != null)
- allFilterStrings.addElement(filterString);
- }
- // ensure this filter string is not already in the list...
- boolean match = false;
- String newfs = additionalFilterString.toString();
- for (int idx=0; !match && (idx<allFilterStrings.size()); idx++)
- {
- IHostProcessFilter prevfs = (IHostProcessFilter)allFilterStrings.elementAt(idx);
- if (newfs.equals(prevfs.toString()))
- match = true;
- }
- if (!match)
- allFilterStrings.addElement(additionalFilterString);
- }
-
- // ------------------------------------------------------------------------
- // GETTER METHODS...
- // ------------------------------------------------------------------------
-
- /**
- * Return the parent subsystem
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
- {
- return subsystem;
- }
- /**
- * Return the parent remote process object expanded to get this object, or null if no such parent
- */
- public IRemoteProcess getParentRemoteProcess()
- {
- return parentProcess;
- }
-
- /**
- * Return the filter string object resolved to get this object
- */
- public IHostProcessFilter getFilterString()
- {
- return filterString;
- }
-
- /**
- * Return all the filter string objects applicable to this folder object.
- */
- public IHostProcessFilter[] getAllFilterStrings()
- {
- if (allFilterStrings == null)
- return new IHostProcessFilter[] {filterString};
- else
- {
- IHostProcessFilter[] all = new IHostProcessFilter[allFilterStrings.size()];
- for (int idx=0; idx<all.length; idx++)
- all[idx] = (IHostProcessFilter)allFilterStrings.elementAt(idx);
- return all;
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java
deleted file mode 100644
index 74a4695ad..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessImpl.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-
-
-/**
- * Represents a remote process on the client machine. Wrappers an IRemoteServerProcess,
- * with methods for returning information about the underlying process, as well
- * as more client-oriented methods for returning information about the associated
- * subsystem, connection, and filter string.
- * @author mjberger
- *
- */
-public class RemoteProcessImpl implements IRemoteProcess, ISystemProcessRemoteConstants
-{
- public static final char CONNECTION_DELIMITER = ':';
- protected IRemoteProcessContext _context;
- protected IHostProcess _underlyingProcess;
- protected IRemoteProcess _parentProcess;
-
- /**
- * Constructor that takes a context object containing important information.
- * @param context An object holding contextual information about this object
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext
- */
- public RemoteProcessImpl(IRemoteProcessContext context, IHostProcess process)
- {
- _context = context;
- if ((context!=null) && (context.getParentRemoteProcessSubSystem()!=null) &&
- !context.getParentRemoteProcessSubSystem().isConnected())
- try
- {
- // deduce active shell from display
- context.getParentRemoteProcessSubSystem().connect();
- } catch (Exception exc) {}
-
- _underlyingProcess = process;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcessSubSystem()
- */
- public IRemoteProcessSubSystem getParentRemoteProcessSubSystem()
- {
- return _context.getParentRemoteProcessSubSystem();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getSystemConnection()
- */
- public IHost getSystemConnection()
- {
- IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
- if (ss == null)
- return null;
- else
- return ss.getHost();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getFilterString()
- */
- public IHostProcessFilter getFilterString()
- {
- return _context.getFilterString();
- }
-
- /**
- * Set the filter string resolved to get this object
- */
- public void setFilterString(IHostProcessFilter filterString)
- {
- _context.setFilterString(filterString);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAbsolutePathPlusConnection()
- */
- public String getAbsolutePathPlusConnection()
- {
- IHost conn = getSystemConnection();
- if (conn == null)
- return getAbsolutePath();
- else
- return conn.getSystemProfileName()+'.'+conn.getAliasName() + CONNECTION_DELIMITER + getAbsolutePath();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getParentRemoteProcess()
- */
- public IRemoteProcess getParentRemoteProcess()
- {
- if (_parentProcess == null)
- {
- IRemoteProcess parentProcess = _context.getParentRemoteProcess();
- if ((parentProcess == null) && getPPid() != -1)
- {
- IRemoteProcessSubSystem ss = _context.getParentRemoteProcessSubSystem();
- if (ss != null)
- {
- try
- {
- parentProcess = ss.getRemoteProcessObject(getPPid());
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("UniversalProcessImpl.getParentRemoteProcess()", e);
- }
-
- }
- }
- _parentProcess = parentProcess;
- }
- return _parentProcess;
- }
-
- /**
- * Return the context associated with this remote process
- */
- public IRemoteProcessContext getContext()
- {
- return _context;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAbsolutePath()
- */
- public String getAbsolutePath()
- {
- return "/proc/" + getPid(); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getPid()
- */
- public long getPid()
- {
- return _underlyingProcess.getPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getPPid()
- */
- public long getPPid()
- {
- return _underlyingProcess.getPPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getName()
- */
- public String getName()
- {
- return _underlyingProcess.getName();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getState()
- */
- public String getState()
- {
- return _underlyingProcess.getState();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getTgid()
- */
- public long getTgid()
- {
- return _underlyingProcess.getTgid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getTracerPid()
- */
- public long getTracerPid()
- {
- return _underlyingProcess.getTracerPid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getUid()
- */
- public long getUid()
- {
- return _underlyingProcess.getUid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getUsername()
- */
- public String getUsername()
- {
- return _underlyingProcess.getUsername();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getGid()
- */
- public long getGid()
- {
- return _underlyingProcess.getGid();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#isRoot()
- */
- public boolean isRoot()
- {
- return _underlyingProcess.isRoot();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getAllProperties()
- */
- public String getAllProperties()
- {
- return _underlyingProcess.getAllProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getVmSizeInKB()
- */
- public long getVmSizeInKB()
- {
- return _underlyingProcess.getVmSizeInKB();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getVmRSSInKB()
- */
- public long getVmRSSInKB()
- {
- return _underlyingProcess.getVmRSSInKB();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess#getLabel()
- */
- public String getLabel()
- {
- return _underlyingProcess.getLabel();
- }
-
- /**
- * Subclasses must override to return the underlying object,
- * whether that is a DataElement, or an IRemoteServerProcess
- */
- public Object getObject()
- {
- return null;
- }
-
- public Object getAdapter(Class adapter) {
- return Platform.getAdapterManager().getAdapter(this, adapter);
-
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java
deleted file mode 100644
index 8a7bbfe43..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemConfiguration.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import java.util.Vector;
-
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.filters.ISystemFilter;
-import org.eclipse.rse.core.filters.ISystemFilterPool;
-import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
-import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.core.subsystem.SystemProcessesCoreResources;
-import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorServerPortInput;
-
-/**
- * The implementation of the RemoteProcessSubSystemConfiguration interface
- * Contains information about what features the subsystem supports
- * @author mjberger
- *
- */
-public abstract class RemoteProcessSubSystemConfiguration extends
- SubSystemConfiguration implements IRemoteProcessSubSystemConfiguration
-{
-
- public RemoteProcessSubSystemConfiguration()
- {
- super();
- }
-
- // --------------------------------------------
- // PARENT METHODS RELATED TO WHAT WE SUPPORT...
- // --------------------------------------------
-
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect()
- {
- return true;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isPortEditable()
- */
- public boolean isPortEditable()
- {
- return true;
- }
-
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsCommands()
- */
- public boolean supportsCommands()
- {
- return false;
- }
- /**
- * We return false.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsProperties()
- */
- public boolean supportsProperties()
- {
- return false;
- }
- /**
- * We return true.
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters()
- {
- return true;
- }
-
- /**
- * We return false
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsNestedFilters()
- */
- public boolean supportsNestedFilters()
- {
- return false;
- }
- /**
- * Return true if you support compile actions for the remote system objects returned from expansion of
- * subsystems created by this subsystem factory.
- * <p>
- * By returning true, user sees a "Work with->Compile Commands..." action item in the popup menu for this
- * subsystem. The action is supplied by the framework, but is populated using overridable methods in this subsystem.
- * <p>We return true.
- */
- public boolean supportsCompileActions()
- {
- return false;
- }
-
- /**
- * Tell us if this subsystem factory supports server launch properties, which allow the user
- * to configure how the server-side code for these subsystems are started. There is a Server
- * Launch Setting property page, with a pluggable composite, where users can configure these
- * properties.
- * <br> We return true.
- */
- public boolean supportsServerLaunchProperties()
- {
- return true;
- }
-
-
-
- // ------------------------------------------------------
- // PARENT METHODS RELATED TO FILTERS...
- // ... ONLY INTERESTING IF supportsFilters() return true!
- // ------------------------------------------------------
-
- /**
- * Override from parent.
- * <p>
- * Here we create the default filter pool for this subsystem factory, and populate it
- * with default filters.
- * <p>
- */
- protected ISystemFilterPool createDefaultFilterPool(ISystemFilterPoolManager mgr)
- {
- ISystemFilterPool pool = null;
- try {
- // -----------------------------------------------------
- // create a pool named filters
- // -----------------------------------------------------
- pool = mgr.createSystemFilterPool(getDefaultFilterPoolName(mgr.getName(), getId()), true); // true=>is deletable by user
-
- // ---------------------------------------------------------------------------------------------
- // create default filters in that pool iff this is the user's private profile we are creating...
- // ---------------------------------------------------------------------------------------------
- if (isUserPrivateProfile(mgr))
- {
-
- Vector filterStrings = new Vector();
-
- // ----------------------
- // "All Processes" filter...
- // ----------------------
- filterStrings = new Vector();
- HostProcessFilterImpl allProcessesFilterString = new HostProcessFilterImpl();
- filterStrings.add(allProcessesFilterString.toString());
- ISystemFilter filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_DEFAULTFILTER_LABEL,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
-
- //------------------------
- // "My Processes" filter...
- // ----------------------
- filterStrings = new Vector();
- HostProcessFilterImpl myProcessesFilterString = new HostProcessFilterImpl();
- myProcessesFilterString.setUsername("${user.id}");
-
- filterStrings.add(myProcessesFilterString.toString());
- filter = mgr.createSystemFilter(pool, SystemProcessesCoreResources.RESID_PROPERTY_PROCESS_MYPROCESSESFILTER_LABEL,filterStrings);
- filter.setNonChangable(true);
- filter.setSingleFilterStringOnly(true);
- }
- } catch (Exception exc)
- {
- SystemBasePlugin.logError("Error creating default filter pool",exc);
- }
- return pool;
- }
-
-
-
- /**
- * Return the translated string to show in the property sheet for the type property.
- */
- public String getTranslatedFilterTypeProperty(ISystemFilter selectedFilter)
- {
- return super.getTranslatedFilterTypeProperty(selectedFilter);
- }
-
- public ISystemValidator getPortValidator()
- {
- ISystemValidator portValidator = new ValidatorServerPortInput();
- return portValidator;
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java
deleted file mode 100644
index 664aa38da..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/core/subsystem/impl/RemoteProcessSubSystemImpl.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.core.subsystem.impl;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.SystemBasePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.SubSystem;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-/**
- * The implementation of the RemoteProcessSubSystem interface.
- * Some of the methods are simply convenience methods - these are
- * implemented here, whereas the real work takes place in the
- * ProcessServiceSubSystem.
- * @author mjberger
- *
- */
-/**
- * @author mjberger
- *
- */
-public abstract class RemoteProcessSubSystemImpl extends SubSystem implements
- IRemoteProcessSubSystem, ICommunicationsListener
-{
-
- public RemoteProcessSubSystemImpl(IHost host, IConnectorService connectorService)
- {
- super(host, connectorService);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getParentRemoteProcessSubSystemConfiguration()
- */
- public IRemoteProcessSubSystemConfiguration getParentRemoteProcessSubSystemConfiguration()
- {
- return (IRemoteProcessSubSystemConfiguration) super.getSubSystemConfiguration();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#isCaseSensitive()
- */
- public boolean isCaseSensitive()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#communicationsStateChange(org.eclipse.rse.core.subsystems.CommunicationsEvent)
- */
- public void communicationsStateChange(CommunicationsEvent e)
- {
- switch (e.getState())
- {
- case CommunicationsEvent.BEFORE_CONNECT :
- break;
- case CommunicationsEvent.AFTER_DISCONNECT :
- getConnectorService().removeCommunicationsListener(this);
-
- break;
-
- case CommunicationsEvent.BEFORE_DISCONNECT :
- case CommunicationsEvent.CONNECTION_ERROR :
- break;
- default :
- break;
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().addCommunicationsListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#uninitializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- getConnectorService().removeCommunicationsListener(this);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getParentProcess(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess)
- */
- public IRemoteProcess getParentProcess(IRemoteProcess process)
- {
- return process.getParentRemoteProcess();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#internalResolveFilterString(org.eclipse.core.runtime.IProgressMonitor, java.lang.String)
- */
- protected Object[] internalResolveFilterString(IProgressMonitor monitor, String filterString)
- throws InvocationTargetException,
- InterruptedException
- {
- if (!isConnected()) {
- return null;
- }
-
- HostProcessFilterImpl rpf = new HostProcessFilterImpl(filterString);
- IRemoteProcessContext context = new RemoteProcessContext(this, null, rpf);
- IRemoteProcess[] ps = null;
- try
- {
- ps = listAllProcesses(rpf, context, monitor);
- }
- catch (SystemMessageException e)
- {
- displayAsyncMsg(e);
- }
- return ps;
- }
-
- /**
- * At this point there is only one root process, the 'init' process with pid 1
- */
- public IRemoteProcess[] listRoots(IRemoteProcessContext context, IProgressMonitor monitor)
- {
- IRemoteProcess[] roots = new IRemoteProcess[1];
- try
- {
- roots[0] = getRemoteProcessObject(1);
- }
- catch (SystemMessageException e)
- {
- SystemBasePlugin.logError("Exception resolving roots", e);
- }
- return roots;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listAllProcesses(org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public abstract IRemoteProcess[] listAllProcesses(
- IHostProcessFilter processNameFilter,
- IRemoteProcessContext context,
- IProgressMonitor monitor) throws InterruptedException,
- SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getRemoteProcessObject(long)
- */
- public abstract IRemoteProcess getRemoteProcessObject(long pid)
- throws SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#kill(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, java.lang.String)
- */
- public abstract boolean kill(IRemoteProcess process, String signal)
- throws SystemMessageException;
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#getSignalTypes()
- */
- public abstract String[] getSignalTypes() throws SystemMessageException;
-
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.ICommunicationsListener#isPassiveCommunicationsListener()
- */
- public boolean isPassiveCommunicationsListener()
- {
- return true;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystem#getObjectWithAbsoluteName(java.lang.String)
- */
- public Object getObjectWithAbsoluteName(String key) throws Exception
- {
- try
- {
- long pid = Long.parseLong(key);
- return getRemoteProcessObject(pid);
- }
- catch (NumberFormatException e)
- {
- return super.getObjectWithAbsoluteName(key);
- }
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
deleted file mode 100644
index ffd6f2f6b..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystem.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.core.subsystems.IServiceSubSystem;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
-
-
-public interface IProcessServiceSubSystem extends IRemoteProcessSubSystem, IServiceSubSystem
-{
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
deleted file mode 100644
index 9adef1954..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/IProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
-
-/**
- * Factory for creating the ProcessServiceSubSystem and for getting the associated
- * service and adapter.
- * @author mjberger
- *
- */
-public interface IProcessServiceSubSystemConfiguration extends IServiceSubSystemConfiguration, IRemoteProcessSubSystemConfiguration
-{
- /**
- * @param host The object representing the remote machine to which the process service is associated
- * @return The process service associated with the host.
- */
- public IProcessService getProcessService(IHost host);
-
- /**
- * Creates a new process service object associated with a specific remote host
- * @param host The object representing the remote machine to which the process service is associated
- * @return The process service associated with the host.
- */
- public IProcessService createProcessService(IHost host);
-
- /**
- * @return An adapter for converting IHostProcess objects to IRemoteProcess
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessAdapter();
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
deleted file mode 100644
index 38e4f44d2..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystem.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
-import org.eclipse.rse.services.clientserver.processes.IHostProcess;
-import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IHostProcessToRemoteProcessAdapter;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
-import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessContext;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl;
-
-/**
- * The subsystem that, coupled with a ProcessService implementation,
- * can query and kill remote processes on a remote system.
- * @author mjberger
- *
- */
-public class ProcessServiceSubSystem extends RemoteProcessSubSystemImpl implements IProcessServiceSubSystem
-{
- protected IProcessService _hostProcessService;
- protected IHostProcessToRemoteProcessAdapter _hostProcessToRemoteProcessAdapter;
-
- public ProcessServiceSubSystem(IHost host, IConnectorService connectorService, IProcessService hostProcessService, IHostProcessToRemoteProcessAdapter adapter)
- {
- super(host, connectorService);
- _hostProcessService = hostProcessService;
- _hostProcessToRemoteProcessAdapter = adapter;
- }
-
- /**
- * @return the process service associated with this subsystem.
- */
- public IProcessService getProcessService()
- {
- return _hostProcessService;
- }
-
- /**
- * Sets which process service is associated with and used by this subsystem.
- * @param service The IProcessService with which to associate this subsystem.
- */
- public void setProcessService(IProcessService service)
- {
- _hostProcessService = service;
- }
-
- /**
- * @return the associated adapter for converting IHostProcess objects to IRemoteProcess objects
- */
- public IHostProcessToRemoteProcessAdapter getHostProcessToRemoteProcessAdapter()
- {
- return _hostProcessToRemoteProcessAdapter;
- }
-
- /**
- * Sets the associated adapter for converting IHostProcess objects to IRemoteProcess objects
- */
- public void setHostProcessToRemoteProcessAdapter(IHostProcessToRemoteProcessAdapter hostProcessAdapter)
- {
- _hostProcessToRemoteProcessAdapter = hostProcessAdapter;
- }
-
- /**
- * Returns the IRemoteProcess representing the process on the remote machine that has a
- * certain pid.
- * @param pid The pid of the process to return
- */
- public IRemoteProcess getRemoteProcessObject(long pid) throws SystemMessageException
- {
- checkIsConnected();
- HostProcessFilterImpl rpfs = new HostProcessFilterImpl();
- rpfs.setPid("" + pid); //$NON-NLS-1$
- IRemoteProcessContext context = new RemoteProcessContext(this, null, rpfs);
- IHostProcess process = getProcessService().getProcess(null, pid);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcess(context, null, process);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#getSignalTypes()
- */
- public String[] getSignalTypes() throws SystemMessageException
- {
- return getProcessService().getSignalTypes();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#kill(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, java.lang.String)
- */
- public boolean kill(IRemoteProcess process, String signal) throws SystemMessageException
- {
- checkIsConnected();
- return getProcessService().kill(null, process.getPid(), signal);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#listAllProcesses(org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws InterruptedException, SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listAllProcesses(monitor, processFilter);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, null, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.services.clientserver.processes.IHostProcessFilter, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid(), processFilter);
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSystem#listChildProcesses(org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess, org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessContext)
- */
- public IRemoteProcess[] listChildProcesses(IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor) throws SystemMessageException
- {
- checkIsConnected();
- IHostProcess[] processes = getProcessService().listChildProcesses(monitor, parent.getPid());
- return getHostProcessToRemoteProcessAdapter().convertToRemoteProcesses(context, parent, processes);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystem#switchServiceFactory(org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration)
- */
- public void switchServiceFactory(IServiceSubSystemConfiguration fact)
- {
- if (fact != getSubSystemConfiguration() && fact instanceof IProcessServiceSubSystemConfiguration)
- {
- IProcessServiceSubSystemConfiguration factory = (IProcessServiceSubSystemConfiguration)fact;
- try
- {
- disconnect();
- }
- catch (Exception e)
- {
- }
-
- IHost host = getHost();
- setSubSystemConfiguration(factory);
- setName(factory.getName());
-
- IConnectorService oldConnectorService = getConnectorService();
- oldConnectorService.deregisterSubSystem(this);
-
- IConnectorService newConnectorService = factory.getConnectorService(host);
- setConnectorService(newConnectorService);
-
- oldConnectorService.commit();
- newConnectorService.commit();
-
- setProcessService(factory.getProcessService(host));
- setHostProcessToRemoteProcessAdapter(factory.getHostProcessAdapter());
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystem#getServiceType()
- */
- public Class getServiceType()
- {
- return IProcessService.class;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void initializeSubSystem(IProgressMonitor monitor)
- {
- super.initializeSubSystem(monitor);
- getProcessService().initService(monitor);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl#initializeSubSystem(org.eclipse.core.runtime.IProgressMonitor)
- */
- public void uninitializeSubSystem(IProgressMonitor monitor)
- {
- super.uninitializeSubSystem(monitor);
- getProcessService().uninitService(monitor);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
deleted file mode 100644
index 306d0b64a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.processes.core/src/org/eclipse/rse/subsystems/processes/servicesubsystem/ProcessServiceSubSystemConfiguration.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.processes.servicesubsystem;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.processes.IProcessService;
-import org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemConfiguration;
-
-/**
- * Factory for creating the ProcessServiceSubSystem and for getting the associated
- * service and adapter.
- * @author mjberger
- *
- */
-public abstract class ProcessServiceSubSystemConfiguration extends RemoteProcessSubSystemConfiguration implements IProcessServiceSubSystemConfiguration
-{
-
- protected Map _services;
-
- protected ProcessServiceSubSystemConfiguration()
- {
- super();
- _services = new HashMap();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.subsystems.processes.servicesubsystem.IProcessServiceSubSystemConfiguration#getProcessService(org.eclipse.rse.model.IHost)
- */
- public IProcessService getProcessService(IHost host)
- {
- IProcessService service = (IProcessService)_services.get(host);
- if (service == null)
- {
- service = createProcessService(host);
- _services.put(host, service);
- }
- return service;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getServiceType()
- */
- public final Class getServiceType()
- {
- return IProcessService.class;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#supportsServerLaunchProperties(org.eclipse.rse.model.IHost)
- */
- public boolean supportsServerLaunchProperties(IHost host)
- {
- return getConnectorService(host).supportsServerLaunchProperties();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.servicesubsystem.IServiceSubSystemConfiguration#getService(org.eclipse.rse.model.IHost)
- */
- public IService getService(IHost host)
- {
- return getProcessService(host);
- }
-} \ No newline at end of file

Back to the top