Class LoaderPane.LocalReader

java.lang.Object
java.lang.Thread
jmri.jmrix.pricom.downloader.LoaderPane.LocalReader
All Implemented Interfaces:
Runnable
Enclosing class:
LoaderPane

Internal class to handle the separate character-receive thread
  • Field Details

  • Constructor Details

  • Method Details

    • run

      public void run()
      Handle incoming characters. This is a permanent loop, looking for input messages in character form on the stream connected to the PortController via connectPort. Terminates with the input stream breaking out of the try block.
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • nibbleIncomingData

      Throws:
      IOException
    • handleIncomingData

      Throws:
      IOException
    • nextMessage

      void nextMessage(byte[] buffer, int length)
      Send the next message of the download.
      Parameters:
      buffer - holds message to be sent
      length - length of message within buffer
    • updateGUI

      void updateGUI()
      Update the GUI for progress

      Should be invoked on the Swing thread

    • enableGUI

      void enableGUI()
      Signal GUI that it's the end of the download

      Should be invoked on the Swing thread