RSE
Release 1.0

org.eclipse.rse.services.processes
Interface IProcessService

All Superinterfaces:
IService
All Known Implementing Classes:
AbstractProcessService, DStoreProcessService, LocalProcessService

public interface IProcessService
extends IService

An IProcessService is an abstraction of a process service that runs over some sort of connection. It can be shared among multiple instances of a subsystem. Each subsystem is currently responsible for layering an abstraction over whatever it wants to construct as a service.

Implementers of this interface will have to either be instantiated, initialized, or somehow derive a connection as part of its state.


Method Summary
 IHostProcess getParentProcess(IProgressMonitor monitor, long PID)
          Given a process, return its parent process object.
 IHostProcess getProcess(IProgressMonitor monitor, long PID)
          Given a pid, return an IHostProcess object for it.
 String[] getSignalTypes()
          Returns a list of the types of signals that can be sent to a process on the remote system.
 boolean kill(IProgressMonitor monitor, long PID, String signal)
          Kills a process.
 IHostProcess[] listAllProcesses(IProgressMonitor monitor)
          Return a list of all processes on the remote system.
 IHostProcess[] listAllProcesses(IProgressMonitor monitor, IHostProcessFilter filter)
          Return a filtered list of all processes on the remote system.
 IHostProcess[] listAllProcesses(IProgressMonitor monitor, String exeNameFilter, String userNameFilter, String stateFilter)
          Return a filtered list of all processes on the remote system.
 IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID)
          Return a list of all remote child processes of the given parent process on the remote system
 IHostProcess[] listChildProcesses(IProgressMonitor monitor, long parentPID, IHostProcessFilter filter)
          Return a filtered list of remote child processes of the given parent process on the remote system
 IHostProcess[] listRootProcesses(IProgressMonitor monitor)
          Returns root processes on the remote system
 
Methods inherited from interface org.eclipse.rse.services.IService
getDescription, getMessage, getName, initService, uninitService
 

Method Detail

listAllProcesses

public IHostProcess[] listAllProcesses(IProgressMonitor monitor)
                                throws SystemMessageException
Return a list of all processes on the remote system.

Parameters:
monitor - A progress monitor to which progress will be reported
Returns:
List of all processes
Throws:
SystemMessageException

listAllProcesses

public IHostProcess[] listAllProcesses(IProgressMonitor monitor,
                                       IHostProcessFilter filter)
                                throws SystemMessageException
Return a filtered list of all processes on the remote system.

Parameters:
monitor - A progress monitor to which progress will be reported
filter - An object to filter results by
Returns:
Filtered list of processes
Throws:
SystemMessageException

listAllProcesses

public IHostProcess[] listAllProcesses(IProgressMonitor monitor,
                                       String exeNameFilter,
                                       String userNameFilter,
                                       String stateFilter)
                                throws SystemMessageException
Return a filtered list of all processes on the remote system.

Parameters:
monitor - A progress monitor to which progress will be reported
exeNameFilter - The executable name to filter results by, or null if no exeName filtering
userNameFilter - The user name to filter results by, or null if no userName filtering
stateFilter - The state code to filter results by, or null if no state filtering
Returns:
Filtered list of processes
Throws:
SystemMessageException

listRootProcesses

public IHostProcess[] listRootProcesses(IProgressMonitor monitor)
                                 throws SystemMessageException
Returns root processes on the remote system

Parameters:
monitor - A progress monitor to which progress will be reported
Returns:
List of root processes
Throws:
SystemMessageException

listChildProcesses

public IHostProcess[] listChildProcesses(IProgressMonitor monitor,
                                         long parentPID)
                                  throws SystemMessageException
Return a list of all remote child processes of the given parent process on the remote system

Parameters:
monitor - A progress monitor to which progress will be reported
parentPID - The ID of the parent process whose children are to be listed
Returns:
List of child processes
Throws:
SystemMessageException

listChildProcesses

public IHostProcess[] listChildProcesses(IProgressMonitor monitor,
                                         long parentPID,
                                         IHostProcessFilter filter)
                                  throws SystemMessageException
Return a filtered list of remote child processes of the given parent process on the remote system

Parameters:
monitor - A progress monitor to which progress will be reported
parentPID - The ID of the parent process whose children are to be listed
filter - A filter to narrow results by
Returns:
Filtered list of child processes
Throws:
SystemMessageException

getParentProcess

public IHostProcess getParentProcess(IProgressMonitor monitor,
                                     long PID)
                              throws SystemMessageException
Given a process, return its parent process object.

Parameters:
monitor - A progress monitor to which progress will be reported
PID - the ID of the process to return parent of.
Returns:
The parent process
Throws:
SystemMessageException

getProcess

public IHostProcess getProcess(IProgressMonitor monitor,
                               long PID)
                        throws SystemMessageException
Given a pid, return an IHostProcess object for it.

Parameters:
monitor - A progress monitor to which progress will be reported
PID - The process ID of the desired process
Returns:
IHostProcess object for the given pid
Throws:
SystemMessageException

kill

public boolean kill(IProgressMonitor monitor,
                    long PID,
                    String signal)
             throws SystemMessageException
Kills a process.

Parameters:
monitor - A progress monitor to which progress will be reported
PID - the ID of the process to be killed.
signal - the signal to send to the process
Returns:
false if the given process doesn't exist, else true. Throws an exception if anything fails.
Throws:
SystemMessageException

getSignalTypes

public String[] getSignalTypes()
Returns a list of the types of signals that can be sent to a process on the remote system.

Returns:
the signal types, or null if there are none, or they cannot be found.

RSE
Release 1.0

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