Package uk.ac.gda.services.core
Class GdaServiceProxy
java.lang.Object
uk.ac.gda.services.core.GdaServiceProxy
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,GdaService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver observer) voidclose()Close and unconfigure the device.voidPerform operations that must be done after Spring initialisation i.e.voiddeleteIObserver(gda.observable.IObserver observer) voidgetAdapter(Class<? extends GdaService> adapter) getAttribute(String attributeName) Get the value of the specified attributegetName()Get the object name.intbooleanIndicates whether this object should be configured at startup.booleanChecks to see if the object is already configured.voidRe-initialisation of values and states.voidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidSet or change the name of the object (as defined in XML).voidsetProtectionLevel(int newLevel) Sets the permission level for this object.setService(GdaService service)
-
Constructor Details
-
GdaServiceProxy
public GdaServiceProxy()
-
-
Method Details
-
addIObserver
public void addIObserver(gda.observable.IObserver observer) - Specified by:
addIObserverin interfacegda.observable.IObservable
-
close
Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Throws:
DeviceException
-
deleteIObserver
public void deleteIObserver(gda.observable.IObserver observer) - Specified by:
deleteIObserverin interfacegda.observable.IObservable
-
deleteIObservers
public void deleteIObservers()- Specified by:
deleteIObserversin interfacegda.observable.IObservable
-
getAdapter
- Specified by:
getAdapterin interfaceGdaService
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved
-
getName
Description copied from interface:FindableGet the object name. Used by Castor to check if the object name has been set before calling theFindable.setName(String)method. -
getProtectionLevel
public int getProtectionLevel()- Specified by:
getProtectionLevelin interfaceDevice- Returns:
- int - the permission level for this object.
-
configure
Description copied from interface:ConfigurablePerform operations that must be done after Spring initialisation i.e. anything that goes beyond setting member variables.- Specified by:
configurein interfaceConfigurable- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
isConfigured
public boolean isConfigured()Description copied from interface:ConfigurableChecks to see if the object is already configured.- Specified by:
isConfiguredin interfaceConfigurable- Returns:
- return
trueif configuredfalseotherwise
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Throws:
FactoryException
-
isConfigureAtStartup
public boolean isConfigureAtStartup()Description copied from interface:ConfigurableIndicates whether this object should be configured at startup.Moved from ConditionallyConfigurable which has been deleted
- Specified by:
isConfigureAtStartupin interfaceConfigurable
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
setName
Description copied from interface:FindableSet or change the name of the object (as defined in XML). -
setProtectionLevel
public void setProtectionLevel(int newLevel) Description copied from interface:DeviceSets the permission level for this object. If this is not set then a default value will be applied.- Specified by:
setProtectionLevelin interfaceDevice- Parameters:
newLevel-
-
setService
-