Package jmri.jmrix.dccpp.dccppovertcp
Class ClientRxHandler
java.lang.Object
java.lang.Thread
jmri.jmrix.dccpp.dccppovertcp.ClientRxHandler
- All Implemented Interfaces:
Runnable,EventListener,AbstractMRListener,DCCppListener
Implementation of the DCCppOverTcp LbServer Server Protocol.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescription(package private) Socket(package private) BufferedReader(package private) String(package private) DCCppMessage(package private) OutputStream(package private) String(package private) final LinkedList<DCCppReply>(package private) Thread(package private) booleanFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidmessage(DCCppMessage msg) Member function that will be invoked by a DCCppInterface implementation to forward a DCC++ message sent to the layout.voidmessage(DCCppReply msg) Member function that will be invoked by a DCCppInterface implementation to forward a DCC++ message from the layout.voidMember function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.voidrun()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
-
Field Details
-
clientSocket
-
inStream
-
outStream
-
replyQueue
-
txThread
-
inString
-
remoteAddress
-
lastSentMessage
-
useOldPrefix
boolean useOldPrefix
-
-
Constructor Details
-
ClientRxHandler
-
-
Method Details
-
run
-
close
-
message
Description copied from interface:DCCppListenerMember function that will be invoked by a DCCppInterface implementation to forward a DCC++ message sent to the layout. Normally, this function will do nothing.- Specified by:
messagein interfaceDCCppListener- Parameters:
msg- The received DCC++ message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Description copied from interface:DCCppListenerMember function that will be invoked by a DCCppInterface implementation to forward a DCC++ message from the layout.- Specified by:
messagein interfaceDCCppListener- Parameters:
msg- The received DCC++ message. Note that this same object may be presented to multiple users. It should not be modified here.
-
notifyTimeout
Description copied from interface:DCCppListenerMember function invoked by an DCCppInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.- Specified by:
notifyTimeoutin interfaceDCCppListener- Parameters:
m- the message that timed out.
-