Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems
Interface RemoteCmdSubSystem

All Superinterfaces:
IRemoteObjectResolver, SubSystem, SystemFilterPoolReferenceManagerProvider
All Known Subinterfaces:
DefaultCmdSubSystem, LocalCmdSubSystem, UniversalCmdSubSystem
All Known Implementing Classes:
DefaultCmdSubSystemImpl, LocalCmdSubSystemImpl, RemoteCmdSubSystemImpl, UniversalCmdSubSystemImpl

public interface RemoteCmdSubSystem
extends SubSystem


Field Summary
static String copyright
           
 
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectResolver
Copyright
 
Method Summary
 void addEnvironmentVariable(RemoteSystemEnvVar rsev)
          Add environment variable entry, given a RemoteSystemEnvVar object
 void addEnvironmentVariable(String name, String value)
          Add environment variable entry, given a name and value
 void cancelShell(Shell shell, Object commandObject)
          Cancel a shell or running command.
 boolean canRunCommand()
          Determine whether the command subsystem can run a command
 boolean canRunShell()
          Determine whether the command subsystem can run a shell
 ICandidateCommand[] getCandidateCommands(Object context)
          Provide a list of possible commands for the specified context.
 IRemoteCommandShell getDefaultShell(Shell shell)
          Get the default running command shell for this command subsystem.
 RemoteSystemEnvVar getEnvironmentVariable(String name)
          Given an environment variable name, find its RemoteSystemEnvVar object.
 RemoteSystemEnvVar[] getEnvironmentVariableList()
          Get the initial environment variable list as a string of RemoteSystemEnvVar objects.
 String getEnvironmentVariableValue(String name)
          Given an environment variable name, find its value.
 EList getEnvVars()
          Private.
 String[] getExecutedCommands()
          Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports true for supportsCommands().
 String getInvalidEnvironmentVariableNameCharacters()
          Get the invalid characters for an environment variable name.
 RemoteCmdSubSystemFactory getParentRemoteCmdSubSystemFactory()
          Return parent subsystem factory, cast to a RemoteCmdSubSystemFactory
 IRemoteCommandShell[] getShells()
          Get all command shells and transient commands that have been run or are running for this command subsystem.
 void removeEnvironmentVariable(RemoteSystemEnvVar rsev)
          Remove environment variable entry given its RemoteSystemEnvVar object
 void removeEnvironmentVariable(String name)
          Remove environment variable entry given only its environment variable name
 void removeShell(Shell shell, Object commandObject)
          Remove a shell.
 IRemoteCommandShell[] restoreShellState(Shell shell)
          Restore all the command shells that were open before disconnecting during the previous session
 Object[] runCommand(String command, Shell shell, Object context)
          Execute a remote command.
 IRemoteCommandShell runShell(Shell shell, Object context)
          Launch a new command shell.
 void sendCommandToShell(String input, Shell shell, Object commandObject)
          Send a command as input to a running command shell.
 void setEnvironmentVariableList(String[] envVarNames, String[] envVarValues)
          Set the initial environment variable list entries, all in one shot, using a pair of String arrays: the first is the environment variable names, the second is the corresponding environment variable values.
 
Methods inherited from interface com.ibm.etools.systems.subsystems.SubSystem
checkIsConnected, clearLocalUserId, connect, connect, connect, deletingConnection, disconnect, disconnect, doesFilterListContentsOf, doesFilterMatch, doesFilterStringListContentsOf, doesFilterStringMatch, forceUserIdToUpperCase, getAdditionalAttributes, getCacheManager, getChildren, getCommandSubSystem, getFactoryId, getFilterPoolReferenceManager, getIbmAttributes, getLocalUserId, getName, getParentSubSystemFactory, getPort, getPortAsInt, getPrimarySubSystem, getProperties, getProperty, getPropertyPage, getRemoteServerLauncher, getSaveFileName, getSystem, getSystemConnection, getSystemConnectionName, getSystemFilterPoolReferenceManager, getSystemManager, getSystemProfile, getSystemProfileName, getTargetForFilter, getUDActionSubsystem, getUserId, getVendorAttribute, getVendorAttributes, hasChildren, isConnected, isConnectionError, isHidden, isOffline, isSetAdditionalAttributes, isSetIbmAttributes, isSetVendorAttributes, isUseSSL, renamingConnection, renamingProfile, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterString, resolveFilterStrings, resolveFilterStrings, setAdditionalAttributes, setConnectionError, setFactoryId, setFilterPoolReferenceManager, setHidden, setIbmAttributes, setName, setParentConnection, setParentSubSystemFactory, setPort, setProperties, setProperty, setRemoteServerLauncher, setSaveFileName, setUserId, setUseSSL, setVendorAttribute, setVendorAttributes, supportsCaching, unsetAdditionalAttributes, unsetIbmAttributes, unsetVendorAttributes
 
Methods inherited from interface com.ibm.etools.systems.filters.SystemFilterPoolReferenceManagerProvider
filterEventFilterCreated, filterEventFilterPoolReferenceCreated, filterEventFilterPoolReferenceDeleted, filterEventFilterPoolReferenceRenamed, filterEventFilterPoolReferenceReset, filterEventFilterPoolReferencesRePositioned, filterEventFilterPoolReferencesReset, filterEventFilterStringCreated, getUniqueOwningSystemFilterPool
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteObjectResolver
getObjectWithAbsoluteName
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Method Detail

getParentRemoteCmdSubSystemFactory

public RemoteCmdSubSystemFactory getParentRemoteCmdSubSystemFactory()
Return parent subsystem factory, cast to a RemoteCmdSubSystemFactory


runCommand

public Object[] runCommand(String command,
                           Shell shell,
                           Object context)
                    throws Exception
Execute a remote command. This is only applicable if the subsystem factory reports true for supportsCommands().

Parameters:
command - Command to be executed remotely.
Returns:
Array of objects that are the result of running this command. Typically, these are messages logged by the command.
Throws:
Exception
See Also:
RemoteCommandHelpers

runShell

public IRemoteCommandShell runShell(Shell shell,
                                    Object context)
                             throws Exception
Launch a new command shell. This is only applicable if the subsystem factory reports true for supportsCommands().

Returns:
An object that represents the command and it's output.
Throws:
Exception
See Also:
RemoteCommandHelpers

sendCommandToShell

public void sendCommandToShell(String input,
                               Shell shell,
                               Object commandObject)
                        throws Exception
Send a command as input to a running command shell.

Throws:
Exception
See Also:
RemoteCommandHelpers

cancelShell

public void cancelShell(Shell shell,
                        Object commandObject)
                 throws Exception
Cancel a shell or running command.

Throws:
Exception

removeShell

public void removeShell(Shell shell,
                        Object commandObject)
                 throws Exception
Remove a shell. If the shell is running cancel it first.

Throws:
Exception

getDefaultShell

public IRemoteCommandShell getDefaultShell(Shell shell)
                                    throws Exception
Get the default running command shell for this command subsystem. If no such shell exists or is running, a new one is launched.

Parameters:
shell - a window used for notification
Returns:
the default running command shell
Throws:
Exception

getShells

public IRemoteCommandShell[] getShells()
Get all command shells and transient commands that have been run or are running for this command subsystem.

Returns:
the list of running command shells and commands

restoreShellState

public IRemoteCommandShell[] restoreShellState(Shell shell)
Restore all the command shells that were open before disconnecting during the previous session

Parameters:
shell - a window used for notification
Returns:
the command shells that were restored

canRunShell

public boolean canRunShell()
Determine whether the command subsystem can run a shell

Returns:
whether a shell can be run or not

canRunCommand

public boolean canRunCommand()
Determine whether the command subsystem can run a command

Returns:
whether a command can be run or not

getExecutedCommands

public String[] getExecutedCommands()
Provide list of executed commands on subsystem.This is only applicable if the subsystem factory reports true for supportsCommands().


getCandidateCommands

public ICandidateCommand[] getCandidateCommands(Object context)
Provide a list of possible commands for the specified context. This method is primarily used for command line assist to get a list of possible command completions. Typically the context is a handle to a shell or command, such as an IRemoteCommandShell, but the interface is left generic, with Object, because some command subsystems have different notions of context.

Parameters:
context - the context for the possible commands
Returns:
a list of possible commands

getEnvironmentVariableList

public RemoteSystemEnvVar[] getEnvironmentVariableList()
Get the initial environment variable list as a string of RemoteSystemEnvVar objects. Array returned may be size zero but will not be null.


setEnvironmentVariableList

public void setEnvironmentVariableList(String[] envVarNames,
                                       String[] envVarValues)
Set the initial environment variable list entries, all in one shot, using a pair of String arrays: the first is the environment variable names, the second is the corresponding environment variable values.


addEnvironmentVariable

public void addEnvironmentVariable(String name,
                                   String value)
Add environment variable entry, given a name and value


addEnvironmentVariable

public void addEnvironmentVariable(RemoteSystemEnvVar rsev)
Add environment variable entry, given a RemoteSystemEnvVar object


removeEnvironmentVariable

public void removeEnvironmentVariable(RemoteSystemEnvVar rsev)
Remove environment variable entry given its RemoteSystemEnvVar object


removeEnvironmentVariable

public void removeEnvironmentVariable(String name)
Remove environment variable entry given only its environment variable name


getEnvironmentVariable

public RemoteSystemEnvVar getEnvironmentVariable(String name)
Given an environment variable name, find its RemoteSystemEnvVar object. Returns null if not found!


getEnvironmentVariableValue

public String getEnvironmentVariableValue(String name)
Given an environment variable name, find its value. Returns null if not found.


getInvalidEnvironmentVariableNameCharacters

public String getInvalidEnvironmentVariableNameCharacters()
Get the invalid characters for an environment variable name. Used by the environment variables property page to diagnose invalid environment variable names.


getEnvVars

public EList getEnvVars()
Private. Do not override or call.

Returns:
The list of EnvVars references

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.