Remote Systems
v6.4.1

com.ibm.etools.systems.universal
Class UniversalSystem

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.AbstractSystem
      extended bycom.ibm.etools.systems.universal.UniversalSystem
All Implemented Interfaces:
ISystem, ISystemUserIdConstants

public class UniversalSystem
extends AbstractSystem

System class required by the remote systems framework. This represents the live connection at tool runtime.

The universal subsystems are based on datastore technology so we use that to do the connection.


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.subsystems.impl.AbstractSystem
connectResult, launchResult, shell
 
Fields inherited from interface com.ibm.etools.systems.core.ISystemUserIdConstants
USERID_LOCATION_CONNECTION, USERID_LOCATION_DEFAULT_OVERALL, USERID_LOCATION_DEFAULT_SYSTEMTYPE, USERID_LOCATION_NOTSET, USERID_LOCATION_SUBSYSTEM
 
Constructor Summary
UniversalSystem()
          Constructor when we don't have a subsystem yet.
UniversalSystem(SubSystem subsystem)
          Constructor when we have a subsystem
 
Method Summary
 void connect(IProgressMonitor monitor)
          Abstract - you must override, unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true Attempt to connect to the remote system.
 void disconnect()
          Abstract - you must override, unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true Disconnect from the remote system.
 String getClientIP()
          Return the Client IP that the RSE server is connected to.
 boolean getDaemonLaunchEnabled(SubSystemImpl subsystemImpl)
          Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
 DataStore getDataStore()
           
 String getHomeDirectory()
          Return the home directory of the remote system for the current user, if available.
 boolean getNoLaunchEnabled(SubSystemImpl subsystemImpl)
          Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
 SystemSignonInformation getPasswordInformation()
          Useful utility method.
 IServerLauncher getRemoteServerLauncher()
          Return the remote server launcher, which implements IServerLauncher.
 boolean getRexecLaunchEnabled(SubSystemImpl subsystemImpl)
          Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
 String getServerInstallPath()
          Return the location where the RSE server is installed
protected  int getSocketTimeOutValue()
           
 String getTempDirectory()
          Return the temp directory of the remote system for the current user, if available.
 String getVersionReleaseModification()
          Return the version, release, modification of the remote system
 boolean isConnected()
          Abstract - you must override unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true Return true if currently connected.
 boolean isNetworkError()
          Shortcut to checking if the network is down
 boolean isPasswordCached()
          Useful utility method.
protected  ConnectionStatus launchServer(ClientConnection clientConnection, SystemSignonInformation info, int daemonPort)
           
protected  boolean promptForTrusting(Shell shell, X509Certificate cert)
           
 void setDaemonLaunchEnabled(SubSystemImpl subsystemImpl, boolean enable)
          Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
 void setNoLaunchEnabled(SubSystemImpl subsystemImpl, boolean enable)
          Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
protected  void setPluginPathProperty()
           
 void setRexecLaunchEnabled(SubSystemImpl subsystemImpl, boolean enable)
          Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)
 void showWarningMsgs(Shell shell, Vector warnings)
          Show any warning messages returned by host api calls.
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.AbstractSystem
addCommunicationsListener, clearCommunicationListeners, clearPasswordCache, clearPasswordCache, clearPasswordForOtherSystemsInConnection, clearUserIdCache, enableServerLaunchType, fireCommunicationsEvent, forcePasswordToUpperCase, getCommunicationListenerCount, getConnectPort, getHostName, getLocalUserId, getPasswordPromptDialog, getPasswordValidator, getPort, getPrimarySubSystem, getSignonValidator, getSubSystem, getSystemType, getUserId, getUserIdValidator, inheritConnectionUserPassword, isEnabledServerLaunchType, isPasswordCached, isSuppressSignonPrompt, notifyConnection, notifyDisconnection, notifyError, promptForPassword, removeCommunicationsListener, reset, setPassword, setPassword, setPasswordInformation, setSubSystem, setSuppressSignonPrompt, shareUserPasswordWithConnection, updatePasswordForOtherSystemsInConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

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

UniversalSystem

public UniversalSystem()
Constructor when we don't have a subsystem yet. Call setSubSystem after.


UniversalSystem

public UniversalSystem(SubSystem subsystem)
Constructor when we have a subsystem

Method Detail

getVersionReleaseModification

public String getVersionReleaseModification()
Return the version, release, modification of the remote system

Specified by:
getVersionReleaseModification in interface ISystem
Overrides:
getVersionReleaseModification in class AbstractSystem

getHomeDirectory

public String getHomeDirectory()
Return the home directory of the remote system for the current user, if available.

Specified by:
getHomeDirectory in interface ISystem
Overrides:
getHomeDirectory in class AbstractSystem

getServerInstallPath

public String getServerInstallPath()
Return the location where the RSE server is installed

Returns:
the server install location

getClientIP

public String getClientIP()
Return the Client IP that the RSE server is connected to. When connected, the client IP is obtained from the server-side. When not-connected, the fall back is to get the IP locally (note that the IP obtained locally may be not be what you want when using VPN).

Returns:
the client ip

getTempDirectory

public String getTempDirectory()
Return the temp directory of the remote system for the current user, if available.

Specified by:
getTempDirectory in interface ISystem
Overrides:
getTempDirectory in class AbstractSystem

getSocketTimeOutValue

protected int getSocketTimeOutValue()

disconnect

public void disconnect()
                throws Exception
Description copied from class: AbstractSystem
Abstract - you must override, unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true

Disconnect from the remote system.
If the subsystem supports server launch, the default behaviour here is to use the same remote server launcher created in connect(), and call IServerLauncher.disconnect().

This is called, by default, from the disConnect(..) method of the subsystem.

Specified by:
disconnect in interface ISystem
Overrides:
disconnect in class AbstractSystem
Throws:
Exception
See Also:
ISystem.disconnect()

setPluginPathProperty

protected void setPluginPathProperty()

setDaemonLaunchEnabled

public void setDaemonLaunchEnabled(SubSystemImpl subsystemImpl,
                                   boolean enable)
Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Specify if you support connecting to a running daemon


getDaemonLaunchEnabled

public boolean getDaemonLaunchEnabled(SubSystemImpl subsystemImpl)
Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Return if you support connecting to a running daemon


setRexecLaunchEnabled

public void setRexecLaunchEnabled(SubSystemImpl subsystemImpl,
                                  boolean enable)
Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Specify if you support remotely launching a server script


getRexecLaunchEnabled

public boolean getRexecLaunchEnabled(SubSystemImpl subsystemImpl)
Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Return if you support remotely launching a server script


setNoLaunchEnabled

public void setNoLaunchEnabled(SubSystemImpl subsystemImpl,
                               boolean enable)
Deprecated. use AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean) or your subsystem factory should override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Specify if you support connecting to a server already running


getNoLaunchEnabled

public boolean getNoLaunchEnabled(SubSystemImpl subsystemImpl)
Deprecated. Use instead AbstractSystem.isEnabledServerLaunchType(SubSystem, ServerLaunchType) or SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType)

Return if you support connecting to a server already running


getRemoteServerLauncher

public IServerLauncher getRemoteServerLauncher()
Return the remote server launcher, which implements IServerLauncher. This is called by the default implementation of connect, if subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true.

Overrides:
getRemoteServerLauncher in class AbstractSystem

connect

public void connect(IProgressMonitor monitor)
             throws Exception
Description copied from class: AbstractSystem
Abstract - you must override, unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true

Attempt to connect to the remote system.
If the subsystem supports server launch, the default behaviour here is to get the remote server launcher via AbstractSystem.getRemoteServerLauncher(), and if IServerLauncher.isLaunched() returns false, to call IServerLauncher.launch(IProgressMonitor).

This is called, by default, from the connect(...) methods of the subsystem.

Specified by:
connect in interface ISystem
Overrides:
connect in class AbstractSystem
Throws:
Exception
See Also:
ISystem.connect(IProgressMonitor)

promptForTrusting

protected boolean promptForTrusting(Shell shell,
                                    X509Certificate cert)

launchServer

protected ConnectionStatus launchServer(ClientConnection clientConnection,
                                        SystemSignonInformation info,
                                        int daemonPort)

isConnected

public boolean isConnected()
Description copied from class: AbstractSystem
Abstract - you must override unless subsystem.getParentSubSystemFactory().supportsServerLaunchProperties returns true

Return true if currently connected.
If the subsystem supports server launch, the default behaviour here is to see if there is a server launcher created in a previous call to connect, and if so, to test it by calling IServerLauncher.isConnected().

This is called, by default, from the isConnected method of the subsystem.

Specified by:
isConnected in interface ISystem
Overrides:
isConnected in class AbstractSystem
See Also:
ISystem.isConnected()

isNetworkError

public boolean isNetworkError()
Shortcut to checking if the network is down


showWarningMsgs

public void showWarningMsgs(Shell shell,
                            Vector warnings)
Show any warning messages returned by host api calls.

Parameters:
shell - Parent UI
warnings - Vector of String or toString()'able messages.

getDataStore

public DataStore getDataStore()
Returns:
The DataStore currently being used by this connection.

getPasswordInformation

public SystemSignonInformation getPasswordInformation()
Description copied from class: AbstractSystem
Useful utility method. Fully implemented, no need to override.
Return the password information for this system's subsystem we are associated with. This is transient. Assumes it has been set already. The password stored in SystemSignonInformation is encrypted.

Overrides:
getPasswordInformation in class AbstractSystem
See Also:
AbstractSystem.getPasswordInformation()

isPasswordCached

public boolean isPasswordCached()
Description copied from class: AbstractSystem
Useful utility method. Fully implemented, do not override.
Return true if password is currently cached.

Specified by:
isPasswordCached in interface ISystem
Overrides:
isPasswordCached in class AbstractSystem
See Also:
AbstractSystem.isPasswordCached()

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.