Class cern.lhcias.csgui.Services.DataServerManager

java.lang.Object
   |
   +----cern.lhcias.csgui.Services.DataServerManager

public class DataServerManager
extends Object

This class is a DataServer class loader. Given the name of the driver, it will automatically create an instance of the DataServer and do the necessary configuration. So all the rest of the interface doesn't need to know about the existing Drivers.


Constructor Index

 o DataServerManager()
 

Method Index

 o addDataServer(DataServer)
Adds a DataServer to the list.
 o createDataServer(String)
Find the correct DataServer for a given type, create an instance of this DataServer and returns it.
 o getCurrentDataServer()
 
 o getDataServer(String)
returns the DataServer names ProcessName.
 o getDataServers()
returns a vector of DataServers containing all the managed DataServers.
 o getGlobalRunningStatus()
 
 o getPossibleProtocols()
Returns all the possible DataServer types as a Vector of Strings
 o isProtocolImplemented(String)
Checks wether a given protocol is implemented by a DataServer.
 o loadAlias(String)
Load the list of aliases for Drivers names
 o setCurrentDataServer(DataServer)
set the current DataServer, which is usually the last driver created.
 o setNewDataServer(String)
Given the configuration String of a driver, this method will check wether the DataServer named ProcessName already exists or not.
 o setNewDataServer(String, String, String, int)
Given the name and the protocol of a driver, this method will check wether the DataServer named ProcessName already exists or not.
 o setNewDataServer(String, String, String, int, TagArrays, boolean, long)
Given the name and the protocol of a driver, this method will check wether the DataServer named ProcessName already exists or not.
 o setup()
need to be called once at the setup of the system
 o startAllDataServers()
 
 o stopAllDataServers()
 

Constructors

 o DataServerManager

 public DataServerManager()

Methods

 o loadAlias

 public static void loadAlias(String aliasAddress)
Load the list of aliases for Drivers names

 o setNewDataServer

 public DataServer setNewDataServer(String config)
Given the configuration String of a driver, this method will check wether the DataServer named ProcessName already exists or not. If it exists, the DataServer is returned. If not, a new DataServer corresponding to the config is instanciated.
Parameters:
config - the configuration string of the DataServer
See Also:
setConfig

 o setNewDataServer

 public DataServer setNewDataServer(String ProcessName,
                                    String Protocol,
                                    String Host,
                                    int Port)
Given the name and the protocol of a driver, this method will check wether the DataServer named ProcessName already exists or not. If it exists, the DataServer is returned. If not, a new DataServer corresponding to the config is instanciated.
See Also:
setConfig

 o setNewDataServer

 public DataServer setNewDataServer(String ProcessName,
                                    String Protocol,
                                    String Host,
                                    int Port,
                                    TagArrays tc,
                                    boolean TagsInURL,
                                    long frequency)
Given the name and the protocol of a driver, this method will check wether the DataServer named ProcessName already exists or not. If it exists, the DataServer is returned. If not, a new DataServer corresponding to the config is instanciated. Some properties of the DataServer are set:
See Also:
setConfig

 o setCurrentDataServer

 public void setCurrentDataServer(DataServer ds)
set the current DataServer, which is usually the last driver created. Normally, this is done when setting a new driver by the setNewDriver method.

 o getDataServers

 public Vector getDataServers()
returns a vector of DataServers containing all the managed DataServers.

 o addDataServer

 public void addDataServer(DataServer ds)
Adds a DataServer to the list. This methods is used for particular DataServers which can't be configured with the setNewDriver method. It is assumed that the DataServer has been properly configured before calling this method.

 o getDataServer

 public DataServer getDataServer(String ProcessName)
returns the DataServer names ProcessName. If no such DataServer exists, null is returned.

 o getCurrentDataServer

 public DataServer getCurrentDataServer()

 o startAllDataServers

 public void startAllDataServers()

 o stopAllDataServers

 public void stopAllDataServers()

 o getGlobalRunningStatus

 public boolean getGlobalRunningStatus()

 o setup

 public static void setup()
need to be called once at the setup of the system

 o getPossibleProtocols

 public static Vector getPossibleProtocols()
Returns all the possible DataServer types as a Vector of Strings

 o isProtocolImplemented

 public static boolean isProtocolImplemented(String protocol)
Checks wether a given protocol is implemented by a DataServer. Returns true if type exists.
Parameters:
type - the type to check

 o createDataServer

 public static DataServer createDataServer(String protocol)
Find the correct DataServer for a given type, create an instance of this DataServer and returns it. In case of error, a null is returned. If an alias list has been loaded it is used to access the correct driver. In case the type of the DataServer is unknown, we try to locate a class which name is the type of the DataServer.
Parameters:
type - the type of the DataServer