org.eclipse.rse.subsystems.processes.servicesubsystem
Class ProcessServiceSubSystem
java.lang.Object
org.eclipse.rse.core.model.RSEPersistableObject
org.eclipse.rse.core.model.PropertySetContainer
org.eclipse.rse.core.model.RSEModelObject
org.eclipse.rse.core.subsystems.SubSystem
org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl
org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem
- All Implemented Interfaces:
- IAdaptable, ISchedulingRule, ISystemFilterPoolReferenceManagerProvider, IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer, ICommunicationsListener, IRemoteObjectResolver, IServiceSubSystem, ISubSystem, IRemoteProcessSubSystem, IProcessServiceSubSystem
public class ProcessServiceSubSystem
- extends RemoteProcessSubSystemImpl
- implements IProcessServiceSubSystem
The subsystem that, coupled with a ProcessService implementation,
can query and kill remote processes on a remote system.
| Nested classes/interfaces inherited from class org.eclipse.rse.core.subsystems.SubSystem |
SubSystem.ChangeStatusJob, SubSystem.ConnectJob, SubSystem.DisconnectJob, SubSystem.DisplayErrorMessageJob, SubSystem.GetPropertiesJob, SubSystem.GetPropertyJob, SubSystem.ResolveAbsoluteJob, SubSystem.ResolveAbsolutesJob, SubSystem.ResolveRelativeJob, SubSystem.SetPropertiesJob, SubSystem.SetPropertyJob, SubSystem.SubSystemOperationJob, SubSystem.SystemMessageDialogRunnable |
| Fields inherited from class org.eclipse.rse.core.subsystems.SubSystem |
_connectionError, _connectorService, _disconnecting, _hidden, _host, _name, _subsystemConfigurationId, cancelable, doConnection, filterPoolReferenceManager, OPERATION_CANCEL_SHELL, OPERATION_CONNECT, OPERATION_DISCONNECT, OPERATION_GET_PROPERTIES, OPERATION_GET_PROPERTY, OPERATION_REMOVE_SHELL, OPERATION_RESOLVE_ABSOLUTE, OPERATION_RESOLVE_ABSOLUTES, OPERATION_RESOLVE_RELATIVE, OPERATION_RUN_COMMAND, OPERATION_RUN_SHELL, OPERATION_SEND_COMMAND_TO_SHELL, OPERATION_SET_PROPERTIES, OPERATION_SET_PROPERTY, parentSubSystemConfiguration, pmDialog, previousUserIdKey, runInThread, saveFileName, shell, sortResults, SUBSYSTEM_FILE_NAME, supportsConnecting |
| Methods inherited from class org.eclipse.rse.core.subsystems.SubSystem |
addResolvedFilterStringObjects, checkIsConnected, clearLocalUserId, commit, connect, connect, connect, contains, deletingConnection, disconnect, disconnect, displayAsyncMsg, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, doesFilterTypeMatch, filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, forceUserIdToUpperCase, getActiveWorkbenchShell, getActiveWorkbenchWindow, getAdapter, getCacheManager, getChildren, getConfigurationId, getConnectionOwnedFilterPoolName, getConnectionPrivateFilterPool, getConnectorService, getExecutedCommands, getFilterPoolReferenceManager, getFilterReferenceWithAbsoluteName, getFirstParentFilterString, getHost, getHostAliasName, getHostName, getLocalUserId, getLocalUserId, getName, getPersistableChildren, getPersistableParent, getPreferencesKey, getPreferencesKey, getPrimarySubSystem, getProperties, getProperty, getPropertyPage, getQueryingMessage, getQueryingMessage, getRemoteAttribute, getResolvingMessage, getRunnableContext, getRunningMessage, getSettingMessage, getSettingMessage, getShell, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getTargetsForFilter, getUniqueOwningSystemFilterPool, getUserId, getVendorAttribute, hasChildren, implicitConnect, internalConnect, internalDisconnect, internalGetProperties, internalGetProperty, internalResolveFilterString, internalResolveFilterStrings, internalSetProperties, internalSetProperty, isConflicting, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, promptForPassword, promptForPassword, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, scheduleJob, selectCommandSubSystem, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setRemoteAttribute, setSubSystemConfiguration, setVendorAttribute, showConnectCancelledMessage, showConnectErrorMessage, showDisconnectCancelledMessage, showDisconnectErrorMessage, showOperationCancelledMessage, showOperationErrorMessage, showOperationMessage, sortResolvedFilterStringObjects, supportsCaching |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystem |
checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getCacheManager, getChildren, getConfigurationId, getConnectorService, getFilterPoolReferenceManager, getHost, getHostAliasName, getLocalUserId, getName, getPrimarySubSystem, getProperties, getProperty, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUserId, getVendorAttribute, hasChildren, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching |
| Methods inherited from interface org.eclipse.rse.core.subsystems.ISubSystem |
checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getCacheManager, getChildren, getConfigurationId, getConnectorService, getFilterPoolReferenceManager, getHost, getHostAliasName, getLocalUserId, getName, getPrimarySubSystem, getProperties, getProperty, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUserId, getVendorAttribute, hasChildren, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching |
_hostProcessService
protected IProcessService _hostProcessService
_hostProcessToRemoteProcessAdapter
protected IHostProcessToRemoteProcessAdapter _hostProcessToRemoteProcessAdapter
ProcessServiceSubSystem
public ProcessServiceSubSystem(IHost host,
IConnectorService connectorService,
IProcessService hostProcessService,
IHostProcessToRemoteProcessAdapter adapter)
getProcessService
public IProcessService getProcessService()
- Returns:
- the process service associated with this subsystem.
setProcessService
public void setProcessService(IProcessService service)
- Sets which process service is associated with and used by this subsystem.
- Parameters:
service - The IProcessService with which to associate this subsystem.
getHostProcessToRemoteProcessAdapter
public IHostProcessToRemoteProcessAdapter getHostProcessToRemoteProcessAdapter()
- Returns:
- the associated adapter for converting IHostProcess objects to IRemoteProcess objects
setHostProcessToRemoteProcessAdapter
public void setHostProcessToRemoteProcessAdapter(IHostProcessToRemoteProcessAdapter hostProcessAdapter)
- Sets the associated adapter for converting IHostProcess objects to IRemoteProcess objects
getRemoteProcessObject
public IRemoteProcess getRemoteProcessObject(long pid)
throws SystemMessageException
- Returns the IRemoteProcess representing the process on the remote machine that has a
certain pid.
- Specified by:
getRemoteProcessObject in interface IRemoteProcessSubSystem
- Parameters:
pid - The pid of the process to return
- Throws:
SystemMessageException
getSignalTypes
public String[] getSignalTypes()
throws SystemMessageException
- Description copied from interface:
IRemoteProcessSubSystem
- Returns a list of the types of signals that can be sent to
a process on the remote system.
- Specified by:
getSignalTypes in interface IRemoteProcessSubSystem
- Returns:
- the signal types, or null if there are none, or they cannot be found.
- Throws:
SystemMessageException
kill
public boolean kill(IRemoteProcess process,
String signal)
throws SystemMessageException
- Description copied from interface:
IRemoteProcessSubSystem
- Kill the given process.
- Specified by:
kill in interface IRemoteProcessSubSystem
- Parameters:
process - represents the object to be killed.
- Returns:
- false if the given process doesn't exist, else true. Throws an exception if anything fails.
- Throws:
SystemMessageException
listAllProcesses
public IRemoteProcess[] listAllProcesses(IHostProcessFilter processFilter,
IRemoteProcessContext context,
IProgressMonitor monitor)
throws InterruptedException,
SystemMessageException
- Description copied from interface:
IRemoteProcessSubSystem
- Return a list of all processes on the remote system.
This version is called directly by users.
- Specified by:
listAllProcesses in interface IRemoteProcessSubSystem
- Parameters:
processFilter - filter the results according to this objectcontext - A context object that will be associated with each returned processmonitor - the progress monitor
- Returns:
- the list of all processes running on the host machine that correspond to the filter,
or null if there are none.
- Throws:
InterruptedException
SystemMessageException
listChildProcesses
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent,
IHostProcessFilter processFilter,
IRemoteProcessContext context,
IProgressMonitor monitor)
throws SystemMessageException
- Description copied from interface:
IRemoteProcessSubSystem
- Return a list of remote child processes of the given process, which match the filter.
- Specified by:
listChildProcesses in interface IRemoteProcessSubSystem
- Parameters:
parent - The parent process whose children to listprocessFilter - The process filter to subset the list by, or null to return all child processes.context - A context object that will be associated with each returned processmonitor - the progress monitor
- Throws:
SystemMessageException
listChildProcesses
public IRemoteProcess[] listChildProcesses(IRemoteProcess parent,
IRemoteProcessContext context,
IProgressMonitor monitor)
throws SystemMessageException
- Description copied from interface:
IRemoteProcessSubSystem
- Return a list of all remote child processes of the given parent process on the remote system
- Specified by:
listChildProcesses in interface IRemoteProcessSubSystem
- Parameters:
parent - The parent process whose children to listcontext - A context object that will be associated with each returned processmonitor - the progress monitor
- Throws:
SystemMessageException
switchServiceFactory
public void switchServiceFactory(IServiceSubSystemConfiguration fact)
- Specified by:
switchServiceFactory in interface IServiceSubSystem
getServiceType
public Class getServiceType()
- Specified by:
getServiceType in interface IServiceSubSystem
initializeSubSystem
public void initializeSubSystem(IProgressMonitor monitor)
- Description copied from class:
SubSystem
- Initialize this subsystem instance after the corresponding
IConnectorService connect method finishes.
This method should be overridden if any initialization for the subsystem needs
to occur at this time
The default implementation currently does nothing, but overriding methods should call super.
- Specified by:
initializeSubSystem in interface ISubSystem- Overrides:
initializeSubSystem in class RemoteProcessSubSystemImpl
- Parameters:
monitor - a monitor that can be used to show progress or provide cancellation.
uninitializeSubSystem
public void uninitializeSubSystem(IProgressMonitor monitor)
- Description copied from class:
SubSystem
- Uninitialize this subsystem just after disconnect.
The default implementation currently does nothing.
Overriding methods should call super.
- Specified by:
uninitializeSubSystem in interface ISubSystem- Overrides:
uninitializeSubSystem in class RemoteProcessSubSystemImpl
- Parameters:
monitor - a progress monitor that can be used to show uninitialization progress can provide cancellation.
Copyright (c) IBM Corporation and others 2000, 2007. All Rights Reserved.