Package jmri.jmrix.pricom.downloader
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
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[](package private) boolean(package private) static final int(package private) int(package private) intFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidSignal GUI that it's the end of the download(package private) void(package private) voidnextMessage(byte[] buffer, int length) Send the next message of the download.(package private) voidvoidrun()Handle incoming characters.(package private) voidUpdate the GUI for progressMethods 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
-
Field Details
-
Constructor Details
-
LocalReader
-
-
Method Details
-
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. -
nibbleIncomingData
- Throws:
IOException
-
handleIncomingData
- Throws:
IOException
-
nextMessage
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
-