Remote Systems
v6.4.1

com.ibm.etools.systems.subsystems.impl
Class IBMServerLauncherImpl

java.lang.Object
  extended byEObjectImpl
      extended bycom.ibm.etools.systems.subsystems.impl.ServerLauncherImpl
          extended bycom.ibm.etools.systems.subsystems.impl.IBMServerLauncherImpl
All Implemented Interfaces:
IBMServerLauncher, ServerLauncher

public class IBMServerLauncherImpl
extends ServerLauncherImpl
implements IBMServerLauncher

This subclass of ServerLauncher is for use by IBM-supplied subsystems, although is possibly of value to vendors as well. The IBM-supplied subsystems use server code written in Java, on top of the datastore technology. You can read about this in the developer guide for Remote System Explorer. The bottom line, however, is we offer the user a number of ways to start that remote server from the client, as well to connect to it if it is already running. This class encapsulates the properties to support that.

Create instances via com.ibm.etools.systems.subsystems.impl.SubSystemFactoryImpl#createIBMServerLauncher(SubSystem)

The following features are implemented:

See Also:
Serialized Form

Field Summary
static String copyright
           
protected static Integer DAEMON_PORT_EDEFAULT
          The default value of the 'Daemon Port' attribute
protected  Integer daemonPort
          The cached value of the 'Daemon Port' attribute
protected static String IBM_ATTRIBUTES_EDEFAULT
          The default value of the 'Ibm Attributes' attribute
protected  String ibmAttributes
          The cached value of the 'Ibm Attributes' attribute
protected  boolean ibmAttributesESet
          This is true if the Ibm Attributes attribute has been set
protected  Hashtable ibmAttrs
           
protected  Integer port
          The cached value of the 'Port' attribute
protected static Integer PORT_EDEFAULT
          The default value of the 'Port' attribute
protected static String RESTRICTED_TYPES_EDEFAULT
          The default value of the 'Restricted Types' attribute
protected  String restrictedTypes
          The cached value of the 'Restricted Types' attribute
protected  boolean restrictedTypesESet
          This is true if the Restricted Types attribute has been set
protected static Integer REXEC_PORT_EDEFAULT
          The default value of the 'Rexec Port' attribute
protected  Integer rexecPort
          The cached value of the 'Rexec Port' attribute
protected  Hashtable rstdtypes
           
protected static ServerLaunchType SERVER_LAUNCH_TYPE_EDEFAULT
          The default value of the 'Server Launch Type' attribute
protected static String SERVER_PATH_EDEFAULT
          The default value of the 'Server Path' attribute
protected static String SERVER_SCRIPT_EDEFAULT
          The default value of the 'Server Script' attribute
protected  ServerLaunchType serverLaunchType
          The cached value of the 'Server Launch Type' attribute
protected  boolean serverLaunchTypeESet
          This is true if the Server Launch Type attribute has been set
protected  String serverPath
          The cached value of the 'Server Path' attribute
protected  String serverScript
          The cached value of the 'Server Script' attribute
 
Fields inherited from class com.ibm.etools.systems.subsystems.impl.ServerLauncherImpl
VENDOR_ATTRIBUTES_EDEFAULT, vendorAttributes, vendorAttributesESet
 
Constructor Summary
protected IBMServerLauncherImpl()
           Constructor.
 
Method Summary
 ServerLauncher cloneServerLauncher(ServerLauncher newOne)
          Clone the contents of this server launcher into the given server launcher Your sublcass must override this if you add additional attributes!
 NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
           Private.
 Object eGet(EStructuralFeature eFeature, boolean resolve)
           Private.
 NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
           Private.
 NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain msgs)
           Private.
 boolean eIsSet(EStructuralFeature eFeature)
           Private.
 void enableServerLaunchType(ServerLaunchType serverLaunchType, boolean enable)
          Call this method to identify specific server launch types that are not to be permitted.
 void eSet(EStructuralFeature eFeature, Object newValue)
           Private.
protected  EClass eStaticClass()
           Private.
 void eUnset(EStructuralFeature eFeature)
           Private.
 Integer getDaemonPort()
          Return the port used for the DAEMON option, as an Integer
 int getDaemonPortAsInt()
          Return the port used for the DAEMON option, as an int
 Integer getDaemonPortGen()
           
 String getIBMAttribute(String attributeName)
          For IBM teams defining their own subclasses and additional attributes.
 String getIbmAttributes()
           Private.
 Integer getPort()
          Return the port as an Integer.
 int getPortAsInt()
          Return the port as an int.
 Integer getPortGen()
           
 String getRestrictedTypes()
           Private.
 Integer getRexecPort()
          Return the port used for the REXEC option, as an Integer
 int getRexecPortAsInt()
          Return the port used for the REXEC option, as an int
 Integer getRexecPortGen()
           
 ServerLaunchType getServerLaunchType()
           This is the means by which to start the server-side code, as specified by the user, typically
 ServerLaunchType getServerLaunchTypeGen()
           Generated.
 String getServerPath()
           The path where the server lives on the remote system.
 String getServerPathGen()
           Generated code.
 String getServerScript()
           The script to run on the remote system, to start the server code
 String getServerScriptGen()
           Generated.
 boolean isEnabledServerLaunchType(ServerLaunchType serverLaunchType)
          This methods returns the enablement state per server launch type.
 boolean isSetIbmAttributes()
           Private.
 boolean isSetRestrictedTypes()
           Private.
 boolean isSetServerLaunchType()
           
 void setDaemonPort(int newDaemonPort)
          Set the DAEMON port value, as an int
 void setDaemonPort(Integer newDaemonPort)
           
 void setIBMAttribute(String attributeName, String attributeValue)
          For IBM teams defining their own subclasses and additional attributes.
 void setIbmAttributes(String newIbmAttributes)
           Private.
 void setPort(Integer newPort)
          Deprecated. call setRexecPort(Integer) or setDaemonPort(Integer) instead.
 void setPortGen(Integer newPort)
           Not actually used anymore
 void setRestrictedTypes(String newRestrictedTypes)
           Private.
 void setRexecPort(int newRexecPort)
          Set the REXEC port value, as an int
 void setRexecPort(Integer newRexecPort)
           
 void setServerLaunchType(ServerLaunchType newServerLaunchType)
           This is the means by which to start the server-side code, as specified by the user, typically.
 void setServerPath(String newServerPath)
           The path where the server lives on the remote system.
 void setServerScript(String newServerScript)
           The script to run on the remote system, to start the server code
 String toString()
           Private.
 void unsetIbmAttributes()
           Private.
 void unsetRestrictedTypes()
           Private.
 void unsetServerLaunchType()
           
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.ServerLauncherImpl
getParentSubSystem, getParentSubSystemFactory, getVendorAttribute, getVendorAttributes, isSetVendorAttributes, setParentSubSystem, setVendorAttribute, setVendorAttributes, unsetVendorAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.subsystems.ServerLauncher
getParentSubSystem, getVendorAttributes, isSetVendorAttributes, setParentSubSystem, setVendorAttributes, unsetVendorAttributes
 

Field Detail

copyright

public static final String copyright

See Also:
Constant Field Values

ibmAttrs

protected Hashtable ibmAttrs

rstdtypes

protected Hashtable rstdtypes

SERVER_LAUNCH_TYPE_EDEFAULT

protected static final ServerLaunchType SERVER_LAUNCH_TYPE_EDEFAULT
The default value of the 'Server Launch Type' attribute.

See Also:
getServerLaunchType()

serverLaunchType

protected ServerLaunchType serverLaunchType
The cached value of the 'Server Launch Type' attribute.

See Also:
getServerLaunchType()

serverLaunchTypeESet

protected boolean serverLaunchTypeESet
This is true if the Server Launch Type attribute has been set.


PORT_EDEFAULT

protected static final Integer PORT_EDEFAULT
The default value of the 'Port' attribute.

See Also:
getPort()

port

protected Integer port
The cached value of the 'Port' attribute.

See Also:
getPort()

REXEC_PORT_EDEFAULT

protected static final Integer REXEC_PORT_EDEFAULT
The default value of the 'Rexec Port' attribute.

See Also:
getRexecPort()

rexecPort

protected Integer rexecPort
The cached value of the 'Rexec Port' attribute.

See Also:
getRexecPort()

DAEMON_PORT_EDEFAULT

protected static final Integer DAEMON_PORT_EDEFAULT
The default value of the 'Daemon Port' attribute.

See Also:
getDaemonPort()

daemonPort

protected Integer daemonPort
The cached value of the 'Daemon Port' attribute.

See Also:
getDaemonPort()

SERVER_PATH_EDEFAULT

protected static final String SERVER_PATH_EDEFAULT
The default value of the 'Server Path' attribute.

See Also:
getServerPath()

serverPath

protected String serverPath
The cached value of the 'Server Path' attribute.

See Also:
getServerPath()

SERVER_SCRIPT_EDEFAULT

protected static final String SERVER_SCRIPT_EDEFAULT
The default value of the 'Server Script' attribute.

See Also:
getServerScript()

serverScript

protected String serverScript
The cached value of the 'Server Script' attribute.

See Also:
getServerScript()

IBM_ATTRIBUTES_EDEFAULT

protected static final String IBM_ATTRIBUTES_EDEFAULT
The default value of the 'Ibm Attributes' attribute.

See Also:
getIbmAttributes()

ibmAttributes

protected String ibmAttributes
The cached value of the 'Ibm Attributes' attribute.

See Also:
getIbmAttributes()

ibmAttributesESet

protected boolean ibmAttributesESet
This is true if the Ibm Attributes attribute has been set.


RESTRICTED_TYPES_EDEFAULT

protected static final String RESTRICTED_TYPES_EDEFAULT
The default value of the 'Restricted Types' attribute.

See Also:
getRestrictedTypes()

restrictedTypes

protected String restrictedTypes
The cached value of the 'Restricted Types' attribute.

See Also:
getRestrictedTypes()

restrictedTypesESet

protected boolean restrictedTypesESet
This is true if the Restricted Types attribute has been set.

Constructor Detail

IBMServerLauncherImpl

protected IBMServerLauncherImpl()
Constructor. Called by EMF code. Create instances via com.ibm.etools.systems.subsystems.impl.SubSystemFactoryImpl#createIBMServerLaucher()

Method Detail

cloneServerLauncher

public ServerLauncher cloneServerLauncher(ServerLauncher newOne)
Clone the contents of this server launcher into the given server launcher Your sublcass must override this if you add additional attributes! Be sure to call super.cloneServerLauncher(newOne) first.

Specified by:
cloneServerLauncher in interface ServerLauncher
Overrides:
cloneServerLauncher in class ServerLauncherImpl
Returns:
the given new server launcher, for convenience.

eStaticClass

protected EClass eStaticClass()
Private. Do not call or use.

Overrides:
eStaticClass in class ServerLauncherImpl

getServerLaunchType

public ServerLaunchType getServerLaunchType()
This is the means by which to start the server-side code, as specified by the user, typically.

Specified by:
getServerLaunchType in interface IBMServerLauncher
Returns:
the value of the 'Server Launch Type' attribute.
See Also:
ServerLaunchType, IBMServerLauncher.isSetServerLaunchType(), IBMServerLauncher.unsetServerLaunchType(), IBMServerLauncher.setServerLaunchType(ServerLaunchType), SubsystemsPackage.getIBMServerLauncher_ServerLaunchType()

getServerLaunchTypeGen

public ServerLaunchType getServerLaunchTypeGen()
Generated. Do not call or use.


setServerLaunchType

public void setServerLaunchType(ServerLaunchType newServerLaunchType)
This is the means by which to start the server-side code, as specified by the user, typically. It is one of the constants in the enumeration class ServerLaunchType

Specified by:
setServerLaunchType in interface IBMServerLauncher
Parameters:
newServerLaunchType - the new value of the 'Server Launch Type' attribute.
See Also:
ServerLaunchType, IBMServerLauncher.isSetServerLaunchType(), IBMServerLauncher.unsetServerLaunchType(), IBMServerLauncher.getServerLaunchType()

unsetServerLaunchType

public void unsetServerLaunchType()

Specified by:
unsetServerLaunchType in interface IBMServerLauncher
See Also:
IBMServerLauncher.isSetServerLaunchType(), IBMServerLauncher.getServerLaunchType(), IBMServerLauncher.setServerLaunchType(ServerLaunchType)

isSetServerLaunchType

public boolean isSetServerLaunchType()

Specified by:
isSetServerLaunchType in interface IBMServerLauncher
Returns:
whether the value of the 'Server Launch Type' attribute is set.
See Also:
IBMServerLauncher.unsetServerLaunchType(), IBMServerLauncher.getServerLaunchType(), IBMServerLauncher.setServerLaunchType(ServerLaunchType)

getRexecPort

public Integer getRexecPort()
Return the port used for the REXEC option, as an Integer

Specified by:
getRexecPort in interface IBMServerLauncher
Returns:
the value of the 'Rexec Port' attribute.
See Also:
IBMServerLauncher.setRexecPort(Integer), SubsystemsPackage.getIBMServerLauncher_RexecPort()

getRexecPortAsInt

public int getRexecPortAsInt()
Return the port used for the REXEC option, as an int

Specified by:
getRexecPortAsInt in interface IBMServerLauncher

getRexecPortGen

public Integer getRexecPortGen()


setRexecPort

public void setRexecPort(int newRexecPort)
Set the REXEC port value, as an int

Specified by:
setRexecPort in interface IBMServerLauncher

setRexecPort

public void setRexecPort(Integer newRexecPort)

Specified by:
setRexecPort in interface IBMServerLauncher
Parameters:
newRexecPort - the new value of the 'Rexec Port' attribute.
See Also:
IBMServerLauncher.getRexecPort()

getDaemonPort

public Integer getDaemonPort()
Return the port used for the DAEMON option, as an Integer

Specified by:
getDaemonPort in interface IBMServerLauncher
Returns:
the value of the 'Daemon Port' attribute.
See Also:
IBMServerLauncher.setDaemonPort(Integer), SubsystemsPackage.getIBMServerLauncher_DaemonPort()

getDaemonPortAsInt

public int getDaemonPortAsInt()
Return the port used for the DAEMON option, as an int

Specified by:
getDaemonPortAsInt in interface IBMServerLauncher

getDaemonPortGen

public Integer getDaemonPortGen()


setDaemonPort

public void setDaemonPort(int newDaemonPort)
Set the DAEMON port value, as an int

Specified by:
setDaemonPort in interface IBMServerLauncher

setDaemonPort

public void setDaemonPort(Integer newDaemonPort)

Specified by:
setDaemonPort in interface IBMServerLauncher
Parameters:
newDaemonPort - the new value of the 'Daemon Port' attribute.
See Also:
IBMServerLauncher.getDaemonPort()

getPortGen

public Integer getPortGen()


getPort

public Integer getPort()
Return the port as an Integer. This just looks at the type, and determines based on it whether to call getRexecPort(), or getDaemonPort().

Specified by:
getPort in interface IBMServerLauncher

getPortAsInt

public int getPortAsInt()
Return the port as an int. This just looks at the type, and determines based on it whether to call getRexecPortAsInt(), or getDaemonPortAsInt().

Specified by:
getPortAsInt in interface IBMServerLauncher

setPort

public void setPort(Integer newPort)
Deprecated. call setRexecPort(Integer) or setDaemonPort(Integer) instead.

Set the port.

Specified by:
setPort in interface IBMServerLauncher
Parameters:
newPort - the new value of the 'Port' attribute.
See Also:
IBMServerLauncher.getPort()

setPortGen

public void setPortGen(Integer newPort)
Not actually used anymore


getServerPath

public String getServerPath()
The path where the server lives on the remote system. Used by at least the REXEC server launch type. Will be null if not set.

Specified by:
getServerPath in interface IBMServerLauncher
Returns:
the value of the 'Server Path' attribute.
See Also:
IBMServerLauncher.setServerPath(String), SubsystemsPackage.getIBMServerLauncher_ServerPath()

getServerPathGen

public String getServerPathGen()
Generated code. Do not call or use.


setServerPath

public void setServerPath(String newServerPath)
The path where the server lives on the remote system. Used by at least the REXEC server launch type.

Specified by:
setServerPath in interface IBMServerLauncher
Parameters:
newServerPath - the new value of the 'Server Path' attribute.
See Also:
IBMServerLauncher.getServerPath()

getServerScript

public String getServerScript()
The script to run on the remote system, to start the server code.

Specified by:
getServerScript in interface IBMServerLauncher
Returns:
the value of the 'Server Script' attribute.
See Also:
IBMServerLauncher.setServerScript(String), SubsystemsPackage.getIBMServerLauncher_ServerScript()

getServerScriptGen

public String getServerScriptGen()
Generated. Do not call or use.


setServerScript

public void setServerScript(String newServerScript)
The script to run on the remote system, to start the server code.

Specified by:
setServerScript in interface IBMServerLauncher
Parameters:
newServerScript - the new value of the 'Server Script' attribute.
See Also:
IBMServerLauncher.getServerScript()

enableServerLaunchType

public void enableServerLaunchType(ServerLaunchType serverLaunchType,
                                   boolean enable)
Call this method to identify specific server launch types that are not to be permitted. This will disable these types in the property page, effectively preventing the user from specifying it. Note this is a transient property, so you should call it each time as part of restoring your subsystem.

You normally do not call this! Rather, your subsystem factory class will override SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType). However, this method is needed by ISVs that re-use IBM-supplied subsystem factories, and merely supply their own ISystem object via the "systemClass" attribute of the subsystemfactory extension point. They don't call this method directly actually, but rather AbstractSystem.enableServerLaunchType(SubSystem, ServerLaunchType, boolean), which in turn calls this.

Specified by:
enableServerLaunchType in interface IBMServerLauncher
See Also:
ServerLaunchType

isEnabledServerLaunchType

public boolean isEnabledServerLaunchType(ServerLaunchType serverLaunchType)
This methods returns the enablement state per server launch type. If enableServerLaunchType(ServerLaunchType,boolean) has not been called for this server launch type, then we defer to the subsystem factory's method: SubSystemFactoryImpl.supportsServerLaunchType(ServerLaunchType).

Specified by:
isEnabledServerLaunchType in interface IBMServerLauncher
See Also:
ServerLaunchType

getIbmAttributes

public String getIbmAttributes()
Private. Do not call or use.
See instead getIBMAttribute(String)

Specified by:
getIbmAttributes in interface IBMServerLauncher
Returns:
the value of the 'Ibm Attributes' attribute.
See Also:
IBMServerLauncher.isSetIbmAttributes(), IBMServerLauncher.unsetIbmAttributes(), IBMServerLauncher.setIbmAttributes(String), SubsystemsPackage.getIBMServerLauncher_IbmAttributes()

setIbmAttributes

public void setIbmAttributes(String newIbmAttributes)
Private. Do not call or use.
See instead setIBMAttribute(String,String)

Specified by:
setIbmAttributes in interface IBMServerLauncher
Parameters:
newIbmAttributes - the new value of the 'Ibm Attributes' attribute.
See Also:
IBMServerLauncher.isSetIbmAttributes(), IBMServerLauncher.unsetIbmAttributes(), IBMServerLauncher.getIbmAttributes()

unsetIbmAttributes

public void unsetIbmAttributes()
Private. Do not call or use.

Specified by:
unsetIbmAttributes in interface IBMServerLauncher
See Also:
IBMServerLauncher.isSetIbmAttributes(), IBMServerLauncher.getIbmAttributes(), IBMServerLauncher.setIbmAttributes(String)

isSetIbmAttributes

public boolean isSetIbmAttributes()
Private. Do not call or use.

Specified by:
isSetIbmAttributes in interface IBMServerLauncher
Returns:
whether the value of the 'Ibm Attributes' attribute is set.
See Also:
IBMServerLauncher.unsetIbmAttributes(), IBMServerLauncher.getIbmAttributes(), IBMServerLauncher.setIbmAttributes(String)

getRestrictedTypes

public String getRestrictedTypes()
Private. Do not call or use.

Specified by:
getRestrictedTypes in interface IBMServerLauncher
Returns:
the value of the 'Restricted Types' attribute.
See Also:
IBMServerLauncher.isSetRestrictedTypes(), IBMServerLauncher.unsetRestrictedTypes(), IBMServerLauncher.setRestrictedTypes(String), SubsystemsPackage.getIBMServerLauncher_RestrictedTypes()

setRestrictedTypes

public void setRestrictedTypes(String newRestrictedTypes)
Private. Do not call or use.

Specified by:
setRestrictedTypes in interface IBMServerLauncher
Parameters:
newRestrictedTypes - the new value of the 'Restricted Types' attribute.
See Also:
IBMServerLauncher.isSetRestrictedTypes(), IBMServerLauncher.unsetRestrictedTypes(), IBMServerLauncher.getRestrictedTypes()

unsetRestrictedTypes

public void unsetRestrictedTypes()
Private. Do not call or use.

Specified by:
unsetRestrictedTypes in interface IBMServerLauncher
See Also:
IBMServerLauncher.isSetRestrictedTypes(), IBMServerLauncher.getRestrictedTypes(), IBMServerLauncher.setRestrictedTypes(String)

isSetRestrictedTypes

public boolean isSetRestrictedTypes()
Private. Do not call or use.

Specified by:
isSetRestrictedTypes in interface IBMServerLauncher
Returns:
whether the value of the 'Restricted Types' attribute is set.
See Also:
IBMServerLauncher.unsetRestrictedTypes(), IBMServerLauncher.getRestrictedTypes(), IBMServerLauncher.setRestrictedTypes(String)

eInverseAdd

public NotificationChain eInverseAdd(InternalEObject otherEnd,
                                     int featureID,
                                     Class baseClass,
                                     NotificationChain msgs)
Private. Do not call or use.

Overrides:
eInverseAdd in class ServerLauncherImpl

eInverseRemove

public NotificationChain eInverseRemove(InternalEObject otherEnd,
                                        int featureID,
                                        Class baseClass,
                                        NotificationChain msgs)
Private. Do not call or use.

Overrides:
eInverseRemove in class ServerLauncherImpl

eBasicRemoveFromContainer

public NotificationChain eBasicRemoveFromContainer(NotificationChain msgs)
Private. Do not call or use.

Overrides:
eBasicRemoveFromContainer in class ServerLauncherImpl

setIBMAttribute

public void setIBMAttribute(String attributeName,
                            String attributeValue)
For IBM teams defining their own subclasses and additional attributes. This method allows an attribute to be persisted in this server launcher, given the following information: Warning do not use any of the following characters in any of given parameters, or it will cause problems with parsing:


getIBMAttribute

public String getIBMAttribute(String attributeName)
For IBM teams defining their own subclasses and additional attributes. This method allows retrieval of a persisted attribute in this server launcher, given the following information: Warning do not use any of the following characters in any of given parameters, or it will cause problems with parsing:

Returns:
value of the attribute being queried, or null if not found

eGet

public Object eGet(EStructuralFeature eFeature,
                   boolean resolve)
Private. Do not call or use.

Overrides:
eGet in class ServerLauncherImpl

eSet

public void eSet(EStructuralFeature eFeature,
                 Object newValue)
Private. Do not call or use.

Overrides:
eSet in class ServerLauncherImpl

eUnset

public void eUnset(EStructuralFeature eFeature)
Private. Do not call or use.

Overrides:
eUnset in class ServerLauncherImpl

eIsSet

public boolean eIsSet(EStructuralFeature eFeature)
Private. Do not call or use.

Overrides:
eIsSet in class ServerLauncherImpl

toString

public String toString()
Private. Do not call or use.

Overrides:
toString in class ServerLauncherImpl

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.