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

DataServerManager
public DataServerManager()

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

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

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

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

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.

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

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.

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

getCurrentDataServer
public DataServer getCurrentDataServer()

startAllDataServers
public void startAllDataServers()

stopAllDataServers
public void stopAllDataServers()

getGlobalRunningStatus
public boolean getGlobalRunningStatus()

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

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

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

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