Class ActiveMqTerminalLogger

java.lang.Object
gda.jython.logger.ActiveMqTerminalLogger
All Implemented Interfaces:
LineLogger, gda.observable.IObserver

public class ActiveMqTerminalLogger extends Object implements LineLogger, gda.observable.IObserver
Class to send text shown in Jython terminal window to ActiveMQ. Destination topic is DEFAULT_QUEUE_TOPIC. This is added as a listener to JythonServer - the update method sends a text representation of all TerminalInput, TerminalOutput and ScanDataPoint messages to ActiveMq in same format as displayed in Jython console. This can also be used in place of a terminal logger RedirectableFileLogger to send data to ActiveMq rather than a file, by creating the bean with the no-arg constructor and passing it to the logger adapter objects.
  • Field Details

  • Constructor Details

    • ActiveMqTerminalLogger

      public ActiveMqTerminalLogger()
    • ActiveMqTerminalLogger

      public ActiveMqTerminalLogger(JythonServer jythonServer)
      Parameters:
      jythonServer - The GDA's JythonServer.
  • Method Details

    • update

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

      public void log(String msg)
      Specified by:
      log in interface LineLogger