Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.subsystems.processes.servicesubsystem
Class ProcessServiceSubSystem


java.lang.Object
  extended by 

org.eclipse.rse.core.model.RSEPersistableObject
      extended by 

org.eclipse.rse.core.model.PropertySetContainer
          extended by 

org.eclipse.rse.core.model.RSEModelObject
              extended by 

org.eclipse.rse.core.subsystems.SubSystem
                  extended by 

org.eclipse.rse.subsystems.processes.core.subsystem.impl.RemoteProcessSubSystemImpl
                      extended by 
org.eclipse.rse.subsystems.processes.servicesubsystem.ProcessServiceSubSystem
All Implemented Interfaces:
IAdaptable, ISchedulingRule, ISystemFilterPoolReferenceManagerProvider, IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer, ICommunicationsListener, IRemoteObjectResolver, 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 Class Summary
 
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
 
Field Summary
protected   IProcessService _hostProcessService
           
protected   IHostProcessToRemoteProcessAdapter _hostProcessToRemoteProcessAdapter
           
 
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
 
Fields inherited from interface org.eclipse.rse.core.model. IRSEPersistableContainer
NO_CHILDREN
 
Constructor Summary
ProcessServiceSubSystem ( IHost host, IConnectorService connectorService, IProcessService hostProcessService, IHostProcessToRemoteProcessAdapter adapter)
           
 
Method Summary
 boolean canSwitchTo ( ISubSystemConfiguration configuration)
          Determine if a service subsystem is capable of switching to this new configuration.
  IHostProcessToRemoteProcessAdapter getHostProcessToRemoteProcessAdapter ()
           
  IProcessService getProcessService ()
           
  IRemoteProcess getRemoteProcessObject (long pid)
          Returns the IRemoteProcess representing the process on the remote machine that has a certain pid.
  Class getServiceType ()
          Return the service type for this subsystem.
  String[] getSignalTypes ()
          Returns a list of the types of signals that can be sent to a process on the remote system.
 void initializeSubSystem ( IProgressMonitor monitor)
          Initialize this subsystem instance after the corresponding IConnectorService connect method finishes.
protected  void internalSwitchSubSystemConfiguration ( ISubSystemConfiguration configuration)
          Perform the subsystem specific processing required to complete a subsystem configuration switch for a service subsystem.
 boolean kill ( IRemoteProcess process, String signal)
          Kill the given process.
  IRemoteProcess[] listAllProcesses ( IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor)
          Return a list of all processes on the remote system.
  IRemoteProcess[] listChildProcesses ( IRemoteProcess parent, IHostProcessFilter processFilter, IRemoteProcessContext context, IProgressMonitor monitor)
          Return a list of remote child processes of the given process, which match the filter.
  IRemoteProcess[] listChildProcesses ( IRemoteProcess parent, IRemoteProcessContext context, IProgressMonitor monitor)
          Return a list of all remote child processes of the given parent process on the remote system
 void setHostProcessToRemoteProcessAdapter ( IHostProcessToRemoteProcessAdapter hostProcessAdapter)
          Sets the associated adapter for converting IHostProcess objects to IRemoteProcess objects
 void setProcessService ( IProcessService service)
          Sets which process service is associated with and used by this subsystem.
 void uninitializeSubSystem ( IProgressMonitor monitor)
          Uninitialize this subsystem just after disconnect.
 
Methods inherited from class org.eclipse.rse.subsystems.processes.core.subsystem.impl. RemoteProcessSubSystemImpl
communicationsStateChange, getObjectWithAbsoluteName, getParentProcess, getParentRemoteProcessSubSystemConfiguration, internalResolveFilterString, isCaseSensitive, isPassiveCommunicationsListener, listRoots
 
Methods inherited from class org.eclipse.rse.core.subsystems. SubSystem
addResolvedFilterStringObjects, checkIsConnected, clearLocalUserId, commit, 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, getAdapter, getCacheManager, getChildren, getConfigurationId, getConnectionOwnedFilterPoolName, getConnectionPrivateFilterPool, getConnectorService, getExecutedCommands, getFilterPoolReferenceManager, getFilterReferenceWithAbsoluteName, getFirstParentFilterString, getHost, getHostAliasName, getHostName, getInteractionProvider, getLocalUserId, getLocalUserId, getName, getObjectWithAbsoluteName, 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, 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, setInteractionProvider, setName, setProperties, setProperty, setRemoteAttribute, setSubSystemConfiguration, setVendorAttribute, showConnectCancelledMessage, showConnectErrorMessage, showDisconnectCancelledMessage, showDisconnectErrorMessage, showOperationCancelledMessage, showOperationErrorMessage, showOperationMessage, sortResolvedFilterStringObjects, supportsCaching, switchServiceFactory
 
Methods inherited from class org.eclipse.rse.core.model. RSEModelObject
getDescription
 
Methods inherited from class org.eclipse.rse.core.model. PropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
Methods inherited from class org.eclipse.rse.core.model. RSEPersistableObject
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 
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.subsystems.processes.core.subsystem. IRemoteProcessSubSystem
getParentProcess, getParentRemoteProcessSubSystemConfiguration, isCaseSensitive, listRoots
 
Methods inherited from interface org.eclipse.rse.core.subsystems. ISubSystem
checkIsConnected, clearLocalUserId, 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, switchServiceFactory
 
Methods inherited from interface org.eclipse.rse.core.filters. ISystemFilterPoolReferenceManagerProvider
filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, getUniqueOwningSystemFilterPool
 
Methods inherited from interface org.eclipse.rse.core.subsystems. IRemoteObjectResolver
getObjectWithAbsoluteName, getObjectWithAbsoluteName
 
Methods inherited from interface org.eclipse.core.runtime.jobs. ISchedulingRule
contains, isConflicting
 
Methods inherited from interface org.eclipse.rse.core.model. IRSEModelObject
getDescription
 
Methods inherited from interface org.eclipse.rse.core.model. IPropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
Methods inherited from interface org.eclipse.rse.core.model. IRSEPersistableContainer
commit, getPersistableChildren, getPersistableParent, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored
 

Field Detail

_hostProcessService

protected 
IProcessService _hostProcessService

_hostProcessToRemoteProcessAdapter

protected 
IHostProcessToRemoteProcessAdapter _hostProcessToRemoteProcessAdapter
Constructor Detail

ProcessServiceSubSystem

public ProcessServiceSubSystem(
IHost host,
                               
IConnectorService connectorService,
                               
IProcessService hostProcessService,
                               
IHostProcessToRemoteProcessAdapter adapter)
Method Detail

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 object
context - A context object that will be associated with each returned process
monitor - 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 list
processFilter - 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 process
monitor - 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 list
context - A context object that will be associated with each returned process
monitor - the progress monitor
Throws:
SystemMessageException

internalSwitchSubSystemConfiguration

protected void internalSwitchSubSystemConfiguration(
ISubSystemConfiguration configuration)
Description copied from class: SubSystem
Perform the subsystem specific processing required to complete a subsystem configuration switch for a service subsystem. The subsystem will typically query this configuration for interesting properties or policies. It should also reset any state to a fresh start. This supplied implementation does nothing. Subclasses may override if they implement a service subsystem.

Overrides:
internalSwitchSubSystemConfiguration in class SubSystem
Parameters:
configuration - the configuration this subsystem should use from this point.

canSwitchTo

public boolean canSwitchTo(
ISubSystemConfiguration configuration)
Description copied from class: SubSystem
Determine if a service subsystem is capable of switching to this new configuration. This is usually a test of this configuration's type against the type expected by this subsystem. This supplied implementation returns false. Subclasses should override if they implement a service subsystem.

Specified by:
canSwitchTo in interface ISubSystem
Overrides:
canSwitchTo in class SubSystem
Parameters:
configuration - the configuration to which this subsystem may switch
Returns:
true if this subsystem is capable of switching to this configuration, false otherwise. This implementation returns false.
See Also:
ISubSystem.canSwitchTo(ISubSystemConfiguration)

getServiceType

public 
Class getServiceType()
Description copied from class: SubSystem
Return the service type for this subsystem.

Specified by:
getServiceType in interface ISubSystem
Overrides:
getServiceType in class SubSystem
Returns:
the default implementation returns null. Subclasses that implement service subsystems should return a type as specified in the interface.
See Also:
ISubSystem.getServiceType()

initializeSubSystem

public void initializeSubSystem(
IProgressMonitor monitor)
                         throws 
SystemMessageException
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 before doing any other work.

Specified by:
initializeSubSystem in interface ISubSystem
Overrides:
initializeSubSystem in class RemoteProcessSubSystemImpl
Parameters:
monitor - a progress monitor that can be used to show progress during long-running operation. Cancellation is typically not supported since it might leave the system in an inconsistent state.
Throws:
SystemMessageException - if an error occurs during initialization.

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 after doing their own work.

Specified by:
uninitializeSubSystem in interface ISubSystem
Overrides:
uninitializeSubSystem in class RemoteProcessSubSystemImpl
Parameters:
monitor - a progress monitor that can be used to show progress during long-running operation. Cancellation is typically not supported since it might leave the system in an inconsistent state.

RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire