Remote Systems
v6.4.1

com.ibm.etools.systems.universal
Class UniversalSystemManager

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.AbstractSystemManager
      extended bycom.ibm.etools.systems.universal.UniversalSystemManager

public class UniversalSystemManager
extends AbstractSystemManager

ISystem manager class. There should be only one of these instantiated. Use getTheUniversalSystemManager to get that singleton.

The job of this manager is to manage and return ISystem objects. It ensures there is only ever one per unique SystemConnection, so that both the file and cmd subsystems can share the same system object.


Field Summary
static String Copyright
           
 
Method Summary
 ISystem createSystemObject(SubSystem subsystem)
          Return the actual ISystem object.
 Class getSubSystemCommonInterface(SubSystem subsystem)
          For all subsystems in a particular SystemConnection, we need to know which ones are to share a single ISystem object.
static UniversalSystemManager getTheUniversalSystemManager()
          Return singleton instance of this class
static boolean isInstantiated()
          Return true if the singleton has been created.
 boolean sharesSystem(SubSystem otherSubSystem)
          Given another subsystem, return true if that subsystem shares a single ISystem object with this one.
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.AbstractSystemManager
getSystemObject, updateSubSystems
 
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
Method Detail

getTheUniversalSystemManager

public static UniversalSystemManager getTheUniversalSystemManager()
Return singleton instance of this class


isInstantiated

public static boolean isInstantiated()
Return true if the singleton has been created. This saves creating it at shutdown just to test for isConnected.


createSystemObject

public ISystem createSystemObject(SubSystem subsystem)
Return the actual ISystem object. We return an instance of UniversalSystem.

Specified by:
createSystemObject in class AbstractSystemManager

getSubSystemCommonInterface

public Class getSubSystemCommonInterface(SubSystem subsystem)
For all subsystems in a particular SystemConnection, we need to know which ones are to share a single ISystem object. To do this, we need a key which is canonical for all subsystems in a given connection. This can be anything, but is typically a unique interface that all subsystems supported a shared ISystem object implement.

Whatever is returned from here is used as the key into a hashtable to find the singleton ISystem object in getSystemObject.

Specified by:
getSubSystemCommonInterface in class AbstractSystemManager
Parameters:
subsystem - - rarely used, but if you support multiple common interfaces then this will help you decide which one to return.
Returns:
IUniversalSubSystem.class

sharesSystem

public boolean sharesSystem(SubSystem otherSubSystem)
Given another subsystem, return true if that subsystem shares a single ISystem object with this one. You must override this to return true if you recognize that subsystem as one of your own. You are guaranteed the other subsystem will be from the same SystemConnection as this one.

You can't assume a SystemConnection will you only have subsystems of that you created, so you should only return true if it implements your interface or you know it is an instance of your subsystem class.

This should simply return (otherSubSystem instanceof interface) where interface is the same one returned from getSubSystemCommonInterface

Specified by:
sharesSystem in class AbstractSystemManager
Returns:
true if otherSubSystem instanceof IUniversalSubSystem

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.