Class GdaServiceProxy

java.lang.Object
uk.ac.gda.services.core.GdaServiceProxy
All Implemented Interfaces:
Device, Configurable, Findable, gda.observable.IObservable, GdaService

public class GdaServiceProxy extends Object implements GdaService
  • Constructor Details

    • GdaServiceProxy

      public GdaServiceProxy()
  • Method Details

    • addIObserver

      public void addIObserver(gda.observable.IObserver observer)
      Specified by:
      addIObserver in interface gda.observable.IObservable
    • close

      public void close() throws DeviceException
      Description copied from interface: Device
      Close and unconfigure the device.
      Specified by:
      close in interface Device
      Throws:
      DeviceException
    • deleteIObserver

      public void deleteIObserver(gda.observable.IObserver observer)
      Specified by:
      deleteIObserver in interface gda.observable.IObservable
    • deleteIObservers

      public void deleteIObservers()
      Specified by:
      deleteIObservers in interface gda.observable.IObservable
    • getAdapter

      public GdaService getAdapter(Class<? extends GdaService> adapter)
      Specified by:
      getAdapter in interface GdaService
    • getAttribute

      public Object getAttribute(String attributeName) throws DeviceException
      Description copied from interface: Device
      Get the value of the specified attribute
      Specified by:
      getAttribute in interface Device
      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

      public String getName()
      Description copied from interface: Findable
      Get the object name. Used by Castor to check if the object name has been set before calling the Findable.setName(String) method.
      Specified by:
      getName in interface Findable
      Returns:
      a String containing the object name.
    • getProtectionLevel

      public int getProtectionLevel()
      Specified by:
      getProtectionLevel in interface Device
      Returns:
      int - the permission level for this object.
    • configure

      public void configure() throws FactoryException
      Description copied from interface: Configurable
      Perform operations that must be done after Spring initialisation i.e. anything that goes beyond setting member variables.
      Specified by:
      configure in interface Configurable
      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: Configurable
      Checks to see if the object is already configured.
      Specified by:
      isConfigured in interface Configurable
      Returns:
      return true if configured false otherwise
    • reconfigure

      public void reconfigure() throws FactoryException
      Description copied from interface: Configurable
      Re-initialisation of values and states.

      Moved from Reconfigurable which has been deleted

      Specified by:
      reconfigure in interface Configurable
      Throws:
      FactoryException
    • isConfigureAtStartup

      public boolean isConfigureAtStartup()
      Description copied from interface: Configurable
      Indicates whether this object should be configured at startup.

      Moved from ConditionallyConfigurable which has been deleted

      Specified by:
      isConfigureAtStartup in interface Configurable
    • setAttribute

      public void setAttribute(String attributeName, Object value) throws DeviceException
      Description copied from interface: Device
      Set any attribute the implementing classes may provide
      Specified by:
      setAttribute in interface Device
      Parameters:
      attributeName - is the name of the attribute
      value - is the value of the attribute
      Throws:
      DeviceException - if an attribute cannot be set
    • setName

      public void setName(String name)
      Description copied from interface: Findable
      Set or change the name of the object (as defined in XML).
      Specified by:
      setName in interface Findable
      Parameters:
      name - the object name
    • setProtectionLevel

      public void setProtectionLevel(int newLevel)
      Description copied from interface: Device
      Sets the permission level for this object. If this is not set then a default value will be applied.
      Specified by:
      setProtectionLevel in interface Device
      Parameters:
      newLevel -
    • setService

      public GdaService setService(GdaService service)