Package uk.ac.gda.services.common.core
Class EndStationServiceManagerWrapper
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
uk.ac.gda.services.common.core.EndStationServiceManagerWrapper
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver,GdaService,EndStationEventProvider,EndStationService,EndStationServiceManager
@ServiceInterface(EndStationService.class)
public class EndStationServiceManagerWrapper
extends FindableConfigurableBase
implements EndStationServiceManager, gda.observable.IObserver
-
Field Summary
Fields inherited from interface uk.ac.gda.services.common.endstation.EndStationService
MODE_ERROR, MODE_PIN, MODE_PIN_KAPPA, MODE_PLATE, MODE_TRANSITION, MODE_TRAY, MODE_UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIObserver(gda.observable.IObserver observer) voidclose()Close and unconfigure the device.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) voidgetAdapter(Class<? extends GdaService> adapter) getAttribute(String attributeName) Get the value of the specified attributeintgetMode()intbooleanIndicates whether this object should be configured at startup.booleanChecks to see if the object is already configured.voidRe-initialisation of values and states.voidselectMode(int mode) Execute transition to new modevoidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetMode(int mode) voidsetProtectionLevel(int newLevel) Sets the permission level for this object.voidsetScriptController(Scriptcontroller observable) voidsetService(EndStationServiceManager service) voidMethods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
setConfigured
-
Constructor Details
-
EndStationServiceManagerWrapper
public EndStationServiceManagerWrapper() -
EndStationServiceManagerWrapper
-
-
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
-
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- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
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
-
getMode
public int getMode()- Specified by:
getModein interfaceEndStationService
-
getProtectionLevel
public int getProtectionLevel()- Specified by:
getProtectionLevelin interfaceDevice- Returns:
- int - the permission level for this object.
-
getService
-
isConfigured
public boolean isConfigured()Description copied from interface:ConfigurableChecks to see if the object is already configured.- Specified by:
isConfiguredin interfaceConfigurable- Overrides:
isConfiguredin classConfigurableBase- Returns:
- return
trueif configuredfalseotherwise
-
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- Overrides:
isConfigureAtStartupin classConfigurableBase
-
reconfigure
Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- Throws:
FactoryException
-
selectMode
public void selectMode(int mode) Description copied from interface:EndStationServiceExecute transition to new mode- Specified by:
selectModein interfaceEndStationService- Parameters:
mode- index of mode that is target of transition
-
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
-
setMode
public void setMode(int mode) - Specified by:
setModein interfaceEndStationServiceManager
-
setScriptController
-
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
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-