Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.connectorservice.dstore
Class DStoreConnectorServiceManager


java.lang.Object
  extended by 

org.eclipse.rse.core.subsystems.AbstractConnectorServiceManager
      extended by 
org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager
All Implemented Interfaces:
IConnectorServiceManager

public class DStoreConnectorServiceManager
extends AbstractConnectorServiceManager

IConnectorService manager class. There should be only one of these instantiated. Use getInstance() to get that singleton.

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


Method Summary
  IConnectorService createConnectorService ( IHost host)
          Return the actual IConnectorService object.
static  DStoreConnectorServiceManager getInstance ()
          Return singleton instance of this class
  Class getSubSystemCommonInterface ( ISubSystem subsystem)
          For all subsystems in a particular SystemConnection, we need to know which ones are to share a single IConnectorService object.
static boolean isInstantiated ()
          Return true if the singleton has been created.
 boolean sharesSystem ( ISubSystem otherSubSystem)
          Given another subsystem, return true if that subsystem shares a single IConnectorService object with this one.
 
Methods inherited from class org.eclipse.rse.core.subsystems. AbstractConnectorServiceManager
findConnHTForDummyHost, getConnectorService, setConnectorService
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static 
DStoreConnectorServiceManager getInstance()
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.


createConnectorService

public 
IConnectorService createConnectorService(
IHost host)
Return the actual IConnectorService object. We return an instance of UniversalSystem.

Specified by:
createConnectorService in class AbstractConnectorServiceManager

getSubSystemCommonInterface

public 
Class getSubSystemCommonInterface(
ISubSystem subsystem)
For all subsystems in a particular SystemConnection, we need to know which ones are to share a single IConnectorService 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 IConnectorService object implement.

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

Specified by:
getSubSystemCommonInterface in class AbstractConnectorServiceManager
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(
ISubSystem otherSubSystem)
Given another subsystem, return true if that subsystem shares a single IConnectorService 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 AbstractConnectorServiceManager
Returns:
true if otherSubSystem instanceof IUniversalSubSystem

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire