Package jmri.jmrix.pricom.downloader
Class LoaderPane.LocalReader
- java.lang.Object
-
- java.lang.Thread
-
- jmri.jmrix.pricom.downloader.LoaderPane.LocalReader
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- LoaderPane
class LoaderPane.LocalReader extends java.lang.Thread
Internal class to handle the separate character-receive thread
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classLoaderPane.LocalReader.Notify
-
Constructor Summary
Constructors Constructor Description LocalReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidenableGUI()Signal GUI that it's the end of the download(package private) voidhandleIncomingData()(package private) voidnextMessage(byte[] buffer, int length)Send the next message of the download.(package private) voidnibbleIncomingData()voidrun()Handle incoming characters.(package private) voidupdateGUI()Update the GUI for progress-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
LocalReader
LocalReader()
-
-
Method Detail
-
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 viaconnectPort. Terminates with the input stream breaking out of the try block.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
nibbleIncomingData
void nibbleIncomingData() throws java.io.IOException
- Throws:
java.io.IOException
-
handleIncomingData
void handleIncomingData() throws java.io.IOException
- Throws:
java.io.IOException
-
nextMessage
void nextMessage(byte[] buffer, int length)
Send the next message of the download.- Parameters:
buffer- holds message to be sentlength- length of message within buffer
-
updateGUI
void updateGUI()
Update the GUI for progressShould be invoked on the Swing thread
-
enableGUI
void enableGUI()
Signal GUI that it's the end of the downloadShould be invoked on the Swing thread
-
-