Package gda.px

Class SampleStoreStateProvider

java.lang.Object
gda.factory.ConfigurableBase
gda.px.SampleStoreStateProvider
All Implemented Interfaces:
Configurable, gda.observable.IObserver

public class SampleStoreStateProvider extends ConfigurableBase implements gda.observable.IObserver
The purpose of this class is to obtain information about the currently-mounted sample (if there is one). Two other objects are used to do this: 1. A SamplePresentMonitor, which can detect physically whether there is a sample mounted on the goniometer. This object is configured during GDA server startup and will know very quickly whether a sample is there or not. 2. The SampleChanger, which may know that it has mounted a sample. Although the sample changer is configured during GDA server startup, it is not enabled. We cannot query the sample changer until it is enabled. Therefore the sample changer's view of what is mounted will typically arrive much later. This information can be used to 'upgrade' what we know about the sample.
  • Constructor Details

    • SampleStoreStateProvider

      public SampleStoreStateProvider()
  • Method Details

    • setSamplePresentMonitor

      public void setSamplePresentMonitor(SamplePresentMonitor samplePresentMonitor)
    • setSampleChanger

      public void setSampleChanger(SampleChanger sampleChanger)
    • setSampleStore

      public void setSampleStore(SampleStore sampleStore)
    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • update

      public void update(Object source, Object observed)
      Specified by:
      update in interface gda.observable.IObserver