Class UDPListener

All Implemented Interfaces:
Device, Configurable, Findable, gda.observable.IObservable

@ServiceInterface(Device.class) public class UDPListener extends DeviceBase
This class receives UDP datagrams containing a string of format prefix:message, which is broadcast to objects observing this to inform then a table in ISPyB has been updated
  • Constructor Details

    • UDPListener

      public UDPListener()
  • Method Details

    • 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
    • isRunning

      public boolean isRunning()
      Returns:
      true if the file is being monitored
    • setRunning

      public void setRunning(boolean running)
      Parameters:
      running -
    • startReading

      protected void startReading()
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
    • getPrefix

      public String getPrefix()
    • setPrefix

      public void setPrefix(String prefix)
    • main

      public static void main(String[] args) throws FactoryException
      Parameters:
      args -
      Throws:
      FactoryException