Class PlotServerBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
uk.ac.diamond.scisoft.analysis.plotserver.PlotServerBase
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,PlotServer,PlotServerDevice,PlotService
@ServiceInterface(PlotServerDevice.class)
public class PlotServerBase
extends DeviceBase
implements PlotServerDevice
This is the fundamental class for all the PlotServer functionality, it is basically a store of all the GUI specific
information so that they are synchronised across all the servers, as well as containing the plot information which
should be displayed on all the GUI windows.
-
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface uk.ac.diamond.scisoft.analysis.PlotServer
GRIDVIEWDIR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver observer) voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.voiddeleteIObserver(gda.observable.IObserver observer) voidThis method should return the plotData which is currently connected to a particular GUIString[]Return a list of all the names known to the plot server.getGuiState(String guiName) This method allows for interested parties to get relevant GUI information about a particular GUI panelstatic PlotServerbooleanvoidThis method should set the data that is to be plotted on the client of a specific nametoString()voidupdateData(String guiName) This method should report to all observers that there is some data available on the server for plotting.voidThis method should be called whenever some GUI information changes, this will then set the GUI's bean which contains all the state information, so that it can be obtained from other GUIs and interested parties.Methods inherited from class gda.device.DeviceBase
close, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevel
-
Constructor Details
-
PlotServerBase
public PlotServerBase()
-
-
Method Details
-
configure
public void configure()Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase
-
getPlotServer
-
getData
Description copied from interface:PlotServiceThis method should return the plotData which is currently connected to a particular GUI- Specified by:
getDatain interfacePlotService- Parameters:
guiName- the name of the GUI which is requesting the data, or the GUI name of the data which a third party is trying to look at- Returns:
- The GUI data for the named GUI
- Throws:
Exception- If there is a problem with communication with the object.
-
getGuiState
Description copied from interface:PlotServiceThis method allows for interested parties to get relevant GUI information about a particular GUI panel- Specified by:
getGuiStatein interfacePlotService- Parameters:
guiName- The name of the GUI panel from which the data is to be retrieved- Returns:
- The data which specifies the requested GUI panels attributes
- Throws:
Exception- If there is a problem with communication with the object.
-
setData
Description copied from interface:PlotServiceThis method should set the data that is to be plotted on the client of a specific name- Specified by:
setDatain interfacePlotService- Parameters:
guiName- The name of the GUI panel to plot todata- The data which requires plotting (can be null to reset server's cached data)- Throws:
Exception- If there is a problem with communication with the object.
-
updateData
Description copied from interface:PlotServiceThis method should report to all observers that there is some data available on the server for plotting. It just sends out the name of the panel for which additional data is available, and it is up to the specific observers as to whether they try to retrieve that data or not using the getPlotData method- Specified by:
updateDatain interfacePlotService- Parameters:
guiName-- Throws:
Exception
-
updateGui
Description copied from interface:PlotServiceThis method should be called whenever some GUI information changes, this will then set the GUI's bean which contains all the state information, so that it can be obtained from other GUIs and interested parties. This also fires off a message to all observers to let them know there has been a change of the GUI data, and this information is also sent with the update- Specified by:
updateGuiin interfacePlotService- Parameters:
guiName- The name of the GUI which is being updatedguiData- The data which specifies that GUI panel- Throws:
Exception- If there is a problem with communication with the object.
-
addIObserver
public void addIObserver(gda.observable.IObserver observer) - Specified by:
addIObserverin interfacegda.observable.IObservable- Overrides:
addIObserverin classDeviceBase
-
deleteIObserver
public void deleteIObserver(gda.observable.IObserver observer) - Specified by:
deleteIObserverin interfacegda.observable.IObservable- Overrides:
deleteIObserverin classDeviceBase
-
deleteIObservers
public void deleteIObservers()- Specified by:
deleteIObserversin interfacegda.observable.IObservable- Overrides:
deleteIObserversin classDeviceBase
-
isServerLocal
- Specified by:
isServerLocalin interfacePlotService- Returns:
- true if plot server is local (i.e. sees the same file system)
- Throws:
Exception- If there is a problem with communication with the object.
-
getGuiNames
Description copied from interface:PlotServiceReturn a list of all the names known to the plot server. That is any guiName that has a data or gui bean- Specified by:
getGuiNamesin interfacePlotService- Returns:
- the list of names
- Throws:
Exception- If there is a problem with communication with the object.
-
toString
-