org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem
Class ShellServiceSubSystem
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.shells.core.subsystems.RemoteCmdSubSystem
org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem
- All Implemented Interfaces:
- IAdaptable, ISchedulingRule, ISystemFilterPoolReferenceManagerProvider, IPropertySetContainer, IRSEModelObject, IRSEPersistableContainer, ICommunicationsListener, IRemoteObjectResolver, IServiceSubSystem, ISubSystem, IRemoteCmdSubSystem, IShellServiceSubSystem
public final class ShellServiceSubSystem
- extends RemoteCmdSubSystem
- implements IShellServiceSubSystem
| 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 |
|
Method Summary |
protected IServiceCommandShell |
createRemoteCommandShell(IRemoteCmdSubSystem cmdSS,
IHostShell hostShell)
|
String[] |
getHostEnvironment()
|
List |
getHostEnvironmentVariables()
|
Class |
getServiceType()
|
IShellService |
getShellService()
|
protected String |
getUserHome()
|
void |
initializeSubSystem(IProgressMonitor monitor)
Initialize this subsystem instance after the corresponding IConnectorService connect method finishes. |
protected void |
internalCancelShell(Object command,
IProgressMonitor monitor)
Cancels a running shell. |
protected Object[] |
internalRunCommand(String cmd,
Object context,
boolean interpretOutput,
IProgressMonitor monitor)
Runs a remote command and interprets any resulting output. |
protected Object[] |
internalRunCommand(String cmd,
Object context,
IProgressMonitor monitor)
Runs a remote command. |
protected IRemoteCommandShell |
internalRunShell(Object context,
IProgressMonitor monitor)
Establishes a new shell. |
protected void |
internalSendCommandToShell(String cmd,
Object command,
IProgressMonitor monitor)
Sends a command to a shell for execution. |
void |
setShellService(IShellService service)
|
void |
switchServiceFactory(IServiceSubSystemConfiguration fact)
swtich from one protocol to another |
void |
uninitializeSubSystem(IProgressMonitor monitor)
Uninitialize this subsystem just after disconnect. |
| Methods inherited from class org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem |
addEnvironmentVariable, addEnvironmentVariable, cancelAllShells, cancelShell, cancelShell, canRunCommand, canRunShell, checkForCancel, communicationsStateChange, createPropertySet, getCandidateCommands, getChildren, getCommandSubSystem, getDefaultShell, getEnvironmentVariable, getEnvironmentVariableList, getEnvironmentVariableValue, getEnvVarsAsStringArray, getFileSubSystem, getInvalidEnvironmentVariableNameCharacters, getObjectWithAbsoluteName, getParentRemoteCmdSubSystemConfiguration, getShells, getUserAndHostEnvVarsAsStringArray, hasChildren, internalRemoveShell, internalResolveFilterString, isPassiveCommunicationsListener, isUniqueVariable, isWindows, parsePathEnvironmentVariable, removeEnvironmentVariable, removeEnvironmentVariable, removeShell, restoreShellState, runCommand, runCommand, runCommand, runCommand, runShell, runShell, saveShellState, sendCommandToShell, sendCommandToShell, setEnvironmentVariableList |
| 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, 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, 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.subsystems.shells.core.subsystems.IRemoteCmdSubSystem |
addEnvironmentVariable, addEnvironmentVariable, cancelShell, canRunCommand, canRunShell, getCandidateCommands, getDefaultShell, getEnvironmentVariable, getEnvironmentVariableList, getEnvironmentVariableValue, getExecutedCommands, getInvalidEnvironmentVariableNameCharacters, getParentRemoteCmdSubSystemConfiguration, getShells, removeEnvironmentVariable, removeEnvironmentVariable, removeShell, restoreShellState, runCommand, runCommand, runShell, sendCommandToShell, sendCommandToShell, setEnvironmentVariableList |
| 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 |
_userHome
protected String _userHome
_hostService
protected IShellService _hostService
ShellServiceSubSystem
public ShellServiceSubSystem(IHost host,
IConnectorService connectorService,
IShellService hostService)
getShellService
public IShellService getShellService()
- Specified by:
getShellService in interface IShellServiceSubSystem
setShellService
public void setShellService(IShellService service)
getUserHome
protected String getUserHome()
internalRunCommand
protected Object[] internalRunCommand(String cmd,
Object context,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException,
SystemMessageException
- Description copied from class:
RemoteCmdSubSystem
- Runs a remote command.
This method must be overridden by implementers of command subsystems.
- Overrides:
internalRunCommand in class RemoteCmdSubSystem
- Parameters:
cmd - The command to execute.context - The IServiceCommandShell that provides the context in which to run this command.monitor - a monitor for progress and cancellation, the caller is expected to call monitor.done()
- Returns:
- an array of 1 object, the IServiceCommandShell, which can be queried for output.
- Throws:
InvocationTargetException - if something else bad happens
InterruptedException - if the user cancels the operation
SystemMessageException - if the command results in an error on the target system
internalRunCommand
protected Object[] internalRunCommand(String cmd,
Object context,
boolean interpretOutput,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException,
SystemMessageException
- Description copied from class:
RemoteCmdSubSystem
- Runs a remote command and interprets any resulting output.
This method must be overridden by implementers of command subsystems.
- Overrides:
internalRunCommand in class RemoteCmdSubSystem
- Parameters:
cmd - The command to execute.context - The IServiceCommandShell that provides the context in which to run this command.monitor - a monitor for progress and cancellation, the caller is expected to call monitor.done()
- Returns:
- an array of 1 object, the IServiceCommandShell, which can be queried for output.
- Throws:
InvocationTargetException - if something else bad happens
InterruptedException - if the user cancels the operation
SystemMessageException - if the command results in an error on the target system
internalRunShell
protected IRemoteCommandShell internalRunShell(Object context,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException,
SystemMessageException
- Description copied from class:
RemoteCmdSubSystem
- Establishes a new shell. This causes the shell to start and establish its initial environment.
This method must be overridden by implementers of command subsystems.
- Overrides:
internalRunShell in class RemoteCmdSubSystem
- Parameters:
context - the current directory for this shell. Can be a String containing a path
name to be used as the current directory or an IRemoteFile representing
a directory. If null or "null", the home directory is used.monitor - a monitor for progress and cancellation, the caller is expected to call monitor.done()
- Returns:
- the newly established shell.
- Throws:
InvocationTargetException - if something else bad happens
InterruptedException - if the user cancels the operation
SystemMessageException - if the command results in an error on the target system
internalCancelShell
protected void internalCancelShell(Object command,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException
- Description copied from class:
RemoteCmdSubSystem
- Cancels a running shell.
This method must be overridden by implementers of command subsystems.
- Overrides:
internalCancelShell in class RemoteCmdSubSystem
- Parameters:
command - the IServiceCommandShell to cancel.monitor - a monitor for progress and cancellation, the caller is expected to call monitor.done()
- Throws:
InvocationTargetException - if something else bad happens
InterruptedException - if the user cancels the operation
internalSendCommandToShell
protected void internalSendCommandToShell(String cmd,
Object command,
IProgressMonitor monitor)
throws InvocationTargetException,
InterruptedException
- Description copied from class:
RemoteCmdSubSystem
- Sends a command to a shell for execution.
This method must be overridden by implementers of command subsystems.
- Overrides:
internalSendCommandToShell in class RemoteCmdSubSystem
- Parameters:
cmd - the command to execute.command - the IServiceCommandShell that provides the context in which to execute the command.monitor - a monitor for progress and cancellation, the caller is expected to call monitor.done()
- Throws:
InvocationTargetException - if something else bad happens
InterruptedException - if the user cancels the operation
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 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 SubSystem
- 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 SubSystem
- 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.