Class cern.lhcias.csgui.WinMgr.CentralManager

java.lang.Object
   |
   +----cern.lhcias.csgui.WinMgr.CentralManager

public class CentralManager
extends Object
implements OpenViewListener

CentralManager is in charge of instanciating the main objects, such as the frames containing the TagsView or the DataServers. It knows where to store the configurations which are to be saved. CentralManager holds global informations on the running system. It knows, for example, whether remote data are being updated or not. Notification for the modifications on these global informations are sent to listeners through StatusEvent.


Constructor Index

 o CentralManager(Vector, Vector, Container)
The configuration of the starting environment is made through a set of
parameters.

Method Index

 o addStatusListener(StatusListener)
 
 o fireStatus(StatusEvent)
 
 o getAccessStatus()
 
 o getAddConfigPg()
 
 o getGlobalRunningStatus()
returns true if data are currently acquired by the system.
 o getRemoteLoadPg()
 
 o getRemoteSavePg()
 
 o loadTagsView(boolean)
A DialogBox of type DialogLoad is opened, and then if needed, a new TagsView will be instanciated.
 o openDBView()
Creates a new FrameDBView, which is a frame and a TagsView of type "DBView".
 o receiveOpenView(OpenViewEvent)
Implementation of OpenViewListener.
 o removeStatusListener(StatusListener)
 
 o Save(TagsView)
Open, if allowed, a dialogbox to ask for a name and save under that name the configuration of a TagsView.
 o setAddConfigPg(String)
 
 o setDataServer(String)
Instanciates a new DataServer.
 o setDataServer(String, String, String, String, String, boolean)
Instanciates a new DataServer.
 o setGlobalRunningStatus(boolean)
to be called when data acquisition is stopped.
 o setRemoteLoadPg(String)
 
 o setRemoteSavePg(String)
 
 o startDataServer()
Starts all DataServers.
 o stopDataServer()
Stops all DataServers.

Constructors

 o CentralManager

 public CentralManager(Vector parameters,
                       Vector values,
                       Container MainContainer)
The configuration of the starting environment is made through a set of
parameters. Those parameters and their values are passed via two vectors;
one containing the names of the parameters and the other one containing
the values of the parameters. Valid parameters are:
SAVE_URL : setRemoteSavePg(value) will be called
ADD_CONFIG_URL : setAddConfigPg(value) will be called
SYN_LIST : setRemoteLoadPg(value) will be called
ALARM_URL : URL of the alarm sound
SYN_RESIZE : Whether the synoptics may be resized or not
COMPONENT_ALIAS : URL of the file containing the list of aliases for the TagsViews
DRIVER_ALIAS : URL of the file containing the list of aliases for the DataServers

--- Definition of a first DataServer -----------------------
TAGS_IN_URL,HOST, PORT, COMMUNICATION_TYPE, PROCESS_NAME, FREQUENCY : See DataServer
Parameters:
parameters - The names of the parameters which have been set.
values - The values of the parameters which have been set.
MainContainer - The starting java.awt.container (ex: the applet itself). After creating the different objects, the constructor will instanciate a TagsView of the type "CompoundView" and will place it in the MainContainer.

Methods

 o openDBView

 public void openDBView()
Creates a new FrameDBView, which is a frame and a TagsView of type "DBView".

 o receiveOpenView

 public void receiveOpenView(OpenViewEvent openvevt)
Implementation of OpenViewListener. receives OpenViewEvent and creates the requested TagsView.

 o loadTagsView

 public void loadTagsView(boolean newwin)
A DialogBox of type DialogLoad is opened, and then if needed, a new TagsView will be instanciated. RemoteLoadPg has to be set.

 o Save

 public void Save(TagsView tv)
Open, if allowed, a dialogbox to ask for a name and save under that name the configuration of a TagsView. AddConfigPg has to be set.
Parameters:
tv - the TagsView which configuration has to be saved.

 o setDataServer

 public void setDataServer(String ProcessName,
                           String DriverType,
                           String frequencyString,
                           String host,
                           String portString,
                           boolean TagsInURL)
Instanciates a new DataServer.
Parameters:
ProcessName - How to name the new DataServer
DriverType - The type of DataServer to create
frequencyString - the frequency as a String (for the polling modes).
host - The host name
portString - The port as a String
TagsinURL - if true, the names of the Tags to poll are sent to the host (polling modes).
See Also:
DataServer

 o setDataServer

 public void setDataServer(String config)
Instanciates a new DataServer. The configuration is passed in a String as described in the DataServer interface.
See Also:
DataServer

 o startDataServer

 public void startDataServer()
Starts all DataServers.
See Also:
DataServerManager

 o stopDataServer

 public void stopDataServer()
Stops all DataServers.
See Also:
DataServerManager

 o getGlobalRunningStatus

 public boolean getGlobalRunningStatus()
returns true if data are currently acquired by the system.
See Also:
DataServerManager

 o setGlobalRunningStatus

 public void setGlobalRunningStatus(boolean status)
to be called when data acquisition is stopped. This event will be sent to all StatusListeners.

 o getAccessStatus

 public boolean getAccessStatus()

 o setRemoteSavePg

 public void setRemoteSavePg(String pgName)

 o getRemoteSavePg

 public String getRemoteSavePg()

 o setRemoteLoadPg

 public void setRemoteLoadPg(String pgName)

 o getRemoteLoadPg

 public String getRemoteLoadPg()

 o setAddConfigPg

 public void setAddConfigPg(String pgName)

 o getAddConfigPg

 public String getAddConfigPg()

 o addStatusListener

 public synchronized void addStatusListener(StatusListener listener)

 o removeStatusListener

 public synchronized void removeStatusListener(StatusListener listener)

 o fireStatus

 public void fireStatus(StatusEvent statusevent)