package samples.subsystems; import com.ibm.etools.systems.subsystems.ISystem; import com.ibm.etools.systems.subsystems.SubSystem; import com.ibm.etools.systems.subsystems.impl.AbstractSystemManager; /** * This class manages our DeveloperSystem objects, so that if we ever have multiple * subsystem factories, different subsystems can share the same system object if they * share the communication layer. */ public class DeveloperSystemManager extends AbstractSystemManager { private static DeveloperSystemManager inst; /** * Constructor for DeveloperSystemManager. */ protected DeveloperSystemManager() { super(); } /** * Return singleton instance */ public static DeveloperSystemManager getTheDeveloperSystemManager() { if (inst == null) inst = new DeveloperSystemManager(); return inst; } /** * @see com.ibm.etools.systems.subsystems.impl.AbstractSystemManager#createSystemObject(SubSystem) */ public ISystem createSystemObject(SubSystem subsystem) { return new DeveloperSystem(subsystem); } /** * @see com.ibm.etools.systems.subsystems.impl.AbstractSystemManager#sharesSystem(SubSystem) */ public boolean sharesSystem(SubSystem otherSubSystem) { return (otherSubSystem instanceof IDeveloperSubSystem); } /** * @see com.ibm.etools.systems.subsystems.impl.AbstractSystemManager#getSubSystemCommonInterface(SubSystem) */ public Class getSubSystemCommonInterface(SubSystem subsystem) { return IDeveloperSubSystem.class; } } b