RSE
Release 1.0

org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem
Class ShellServiceSubSystem

java.lang.Object
  extended byorg.eclipse.rse.core.model.PropertySetContainer
      extended byorg.eclipse.rse.core.model.RSEModelObject
          extended byorg.eclipse.rse.core.subsystems.SubSystem
              extended byorg.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
                  extended byorg.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem
All Implemented Interfaces:
IAdaptable, ICommunicationsListener, IPropertySetContainer, IRemoteCmdSubSystem, IRemoteObjectResolver, IRSEModelObject, org.eclipse.rse.core.persistance.IRSEPersistableContainer, ISchedulingRule, IServiceSubSystem, IShellServiceSubSystem, ISubSystem, ISystemFilterPoolReferenceManagerProvider, ISystemResourceChangeEvents

public final class ShellServiceSubSystem
extends org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
implements IShellServiceSubSystem


Nested Class Summary
 
Nested classes inherited from class org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.CancelShellJob, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.Refresh, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.RefreshRemovedShell, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.RefreshSubSystem, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.RemoveShellJob, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.RunCommandJob, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.RunShellJob, org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem.SendCommandToShellJob
 
Nested classes 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  IShellService _hostService
           
protected  String _userHome
           
 
Fields inherited from class org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
_cmdShells, _defaultShell, _envVars, _fileSubSystem, COMMAND_SHELLS_MEMENTO, envVars
 
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 class org.eclipse.rse.core.model.RSEModelObject
_isDirty, _wasRestored
 
Fields inherited from interface org.eclipse.rse.model.ISystemResourceChangeEvents
EVENT_ADD, EVENT_ADD_FILTER_REFERENCE, EVENT_ADD_FILTERSTRING_REFERENCE, EVENT_ADD_MANY, EVENT_ADD_RELATIVE, EVENT_CHANGE_CHILDREN, EVENT_CHANGE_FILTER_REFERENCE, EVENT_CHANGE_FILTERSTRING_REFERENCE, EVENT_COLLAPSE_ALL, EVENT_COLLAPSE_SELECTED, EVENT_COMMAND_FINISHED, EVENT_COMMAND_HISTORY_UPDATE, EVENT_COMMAND_MESSAGE, EVENT_COMMAND_RUN, EVENT_COMMAND_SHELL_FINISHED, EVENT_COMMAND_SHELL_REMOVED, EVENT_COMPILE_COMMAND_RUN, EVENT_DELETE, EVENT_DELETE_FILTER_REFERENCE, EVENT_DELETE_FILTERSTRING_REFERENCE, EVENT_DELETE_MANY, EVENT_EXPAND_SELECTED, EVENT_ICON_CHANGE, EVENT_MOVE_FILTER_REFERENCES, EVENT_MOVE_FILTERSTRING_REFERENCES, EVENT_MOVE_MANY, EVENT_MUST_COLLAPSE, EVENT_PROPERTY_CHANGE, EVENT_PROPERTYSHEET_UPDATE, EVENT_REFRESH, EVENT_REFRESH_REMOTE, EVENT_REFRESH_SELECTED, EVENT_REFRESH_SELECTED_FILTER, EVENT_REFRESH_SELECTED_PARENT, EVENT_RENAME, EVENT_RENAME_FILTER_REFERENCE, EVENT_REPLACE_CHILDREN, EVENT_REVEAL_AND_SELECT, EVENT_SEARCH_FINISHED, EVENT_SELECT, EVENT_SELECT_EXPAND, EVENT_SELECT_REMOTE, PROPERTYSHEET_UPDATE_EVENT
 
Constructor Summary
ShellServiceSubSystem(IHost host, IConnectorService connectorService, IShellService hostService)
           
 
Method Summary
protected  IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
           
 String[] getHostEnvironment()
           
 List getHostEnvironmentVariables()
           
 Class getServiceType()
           
 IShellService getShellService()
           
protected  String getUserHome()
           
 void initializeSubSystem(IProgressMonitor monitor)
          Called on each subsystem associated with a particular IConnectorService after it connects.
protected  void internalCancelShell(IProgressMonitor monitor, Object command)
           
protected  Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context)
          Actually run a remote command.
protected  Object[] internalRunCommand(IProgressMonitor monitor, String cmd, Object context, boolean interpretOutput)
          Actually run a remote command.
protected  IRemoteCommandShell internalRunShell(IProgressMonitor monitor, Object context)
           
protected  void internalSendCommandToShell(IProgressMonitor monitor, String cmd, Object command)
           
 void setShellService(IShellService service)
           
 void switchServiceFactory(IServiceSubSystemConfiguration fact)
          swtich from one protocol to another
 void uninitializeSubSystem(IProgressMonitor monitor)
          Called on each subsystem associated with a particular IConnectorService after it disconnects
 
Methods inherited from class org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
addEnvironmentVariable, addEnvironmentVariable, cancelAllShells, cancelShell, canRunCommand, canRunShell, checkForCancel, communicationsStateChange, getCandidateCommands, getChildren, getCommandSubSystem, getDefaultShell, getEnvironmentVariable, getEnvironmentVariableList, getEnvironmentVariableValue, getEnvVars, getEnvVarsAsStringArray, getFileSubSystem, getInvalidEnvironmentVariableNameCharacters, getObjectWithAbsoluteName, getParentRemoteCmdSubSystemConfiguration, getShellEncoding, getShells, getUserAndHostEnvVarsAsStringArray, hasChildren, internalRemoveShell, internalResolveFilterString, isPassiveCommunicationsListener, isUniqueVariable, isWindows, parsePathEnvironmentVariable, removeEnvironmentVariable, removeEnvironmentVariable, removeShell, restoreShellState, runCommand, runCommand, runShell, saveShellState, sendCommandToShell, setEnvironmentVariableList, setShellEncoding
 
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, getActiveWorkbenchShell, getActiveWorkbenchWindow, getAdapter, getCacheManager, getConfigurationId, getConnectionOwnedFilterPoolName, getConnectionPrivateFilterPool, getConnectorService, getExecutedCommands, getFilterPoolReferenceManager, getFilterReferenceWithAbsoluteName, getFirstParentFilterString, getHost, getHostAliasName, getHostName, getLocalUserId, getLocalUserId, getName, getPreferencesKey, getPreferencesKey, getPreferencesManager, getPrimarySubSystem, getProperties, getProperty, getPropertyPage, getQueryingMessage, getQueryingMessage, getRemoteAttribute, getResolvingMessage, getRunnableContext, getRunningMessage, getSettingMessage, getSettingMessage, getShell, getSubSystemConfiguration, getSystemFilterPoolReferenceManager, getSystemProfile, getSystemProfileName, getSystemType, getTargetForFilter, getTargetsForFilter, getUniqueOwningSystemFilterPool, getUserId, getVendorAttribute, implicitConnect, internalConnect, internalDisconnect, internalGetProperties, internalGetProperty, internalResolveFilterString, internalResolveFilterStrings, internalSetProperties, internalSetProperty, isConflicting, isConnected, isConnectionError, isHidden, isOffline, isPrimarySubSystem, promptForPassword, promptForPassword, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterStrings, 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 org.eclipse.rse.core.model.RSEModelObject
compareStrings, getDescription, isDirty, setDirty, setWasRestored, wasRestored
 
Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer
addPropertySet, addPropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet
 
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.shells.core.subsystems.IRemoteCmdSubSystem
addEnvironmentVariable, addEnvironmentVariable, cancelShell, canRunCommand, canRunShell, getCandidateCommands, getDefaultShell, getEnvironmentVariable, getEnvironmentVariableList, getEnvironmentVariableValue, getEnvVars, getExecutedCommands, getInvalidEnvironmentVariableNameCharacters, getParentRemoteCmdSubSystemConfiguration, getShellEncoding, getShells, removeEnvironmentVariable, removeEnvironmentVariable, removeShell, restoreShellState, runCommand, runCommand, runShell, sendCommandToShell, setEnvironmentVariableList
 
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, resolveFilterString, resolveFilterString, resolveFilterStrings, resolveFilterStrings, setConfigurationId, setConnectionError, setConnectorService, setFilterPoolReferenceManager, setHidden, setHost, setName, setProperties, setProperty, setSubSystemConfiguration, setVendorAttribute, supportsCaching
 
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
 
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.persistance.IRSEPersistableContainer
commit, isDirty, setDirty, setWasRestored, wasRestored
 

Field Detail

_userHome

protected String _userHome

_hostService

protected IShellService _hostService
Constructor Detail

ShellServiceSubSystem

public ShellServiceSubSystem(IHost host,
                             IConnectorService connectorService,
                             IShellService hostService)
Method Detail

getShellService

public IShellService getShellService()
Specified by:
getShellService in interface IShellServiceSubSystem

setShellService

public void setShellService(IShellService service)

getUserHome

protected String getUserHome()

internalRunCommand

protected Object[] internalRunCommand(IProgressMonitor monitor,
                                      String cmd,
                                      Object context)
                               throws InvocationTargetException,
                                      InterruptedException,
                                      SystemMessageException
Description copied from class: org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
Actually run a remote command. This is called by the run(IProgressMonitor monitor) method, which in turn is called by runCommand(...).

As per IRunnableWithProgress rules:

YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!

Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunCommand

protected Object[] internalRunCommand(IProgressMonitor monitor,
                                      String cmd,
                                      Object context,
                                      boolean interpretOutput)
                               throws InvocationTargetException,
                                      InterruptedException,
                                      SystemMessageException
Description copied from class: org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystem
Actually run a remote command. This is called by the run(IProgressMonitor monitor) method, which in turn is called by runCommand(...).

As per IRunnableWithProgress rules:

YOU MUST OVERRIDE THIS IF YOU SUPPORT COMMANDS!

Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalRunShell

protected IRemoteCommandShell internalRunShell(IProgressMonitor monitor,
                                               Object context)
                                        throws InvocationTargetException,
                                               InterruptedException,
                                               SystemMessageException
Throws:
InvocationTargetException
InterruptedException
SystemMessageException

internalCancelShell

protected void internalCancelShell(IProgressMonitor monitor,
                                   Object command)
                            throws InvocationTargetException,
                                   InterruptedException
Throws:
InvocationTargetException
InterruptedException

internalSendCommandToShell

protected void internalSendCommandToShell(IProgressMonitor monitor,
                                          String cmd,
                                          Object command)
                                   throws InvocationTargetException,
                                          InterruptedException
Throws:
InvocationTargetException
InterruptedException

createRemoteCommandShell

protected IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS,
                                                        IHostShell hostShell)

getHostEnvironment

public String[] getHostEnvironment()

getHostEnvironmentVariables

public List getHostEnvironmentVariables()
Specified by:
getHostEnvironmentVariables in interface IRemoteCmdSubSystem

switchServiceFactory

public void switchServiceFactory(IServiceSubSystemConfiguration fact)
swtich from one protocol to another

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 interface: ISubSystem
Called on each subsystem associated with a particular IConnectorService after it connects.

Specified by:
initializeSubSystem in interface ISubSystem
Overrides:
initializeSubSystem in class SubSystem
Parameters:
monitor - a monitor that can be used to show progress or provide cancellation.

uninitializeSubSystem

public void uninitializeSubSystem(IProgressMonitor monitor)
Description copied from interface: ISubSystem
Called on each subsystem associated with a particular IConnectorService after it disconnects

Specified by:
uninitializeSubSystem in interface ISubSystem
Overrides:
uninitializeSubSystem in class SubSystem
Parameters:
monitor - a progress monitor that can be used to show uninitialization progress can provide cancellation.

RSE
Release 1.0

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