com.ajdigital.chat.server.remote
Class FlashReaderThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.lyrisoft.chat.server.remote.ReaderThread
              |
              +--com.ajdigital.chat.server.remote.FlashReaderThread
All Implemented Interfaces:
java.lang.Runnable

public class FlashReaderThread
extends ReaderThread

Adaptation of a ReaderThread to accept messages coming from a Flash client that uses a null byte as it's message delimiter and wraps it's messages in simple XML.

Author:
Alon Salant

Field Summary
protected  java.io.InputStreamReader _instream
          Input stream that we watch for new messages
static java.lang.String XML_END
          String that ends XML wrapper
static java.lang.String XML_START
          String that starts XML wrapper
 
Fields inherited from class com.lyrisoft.chat.server.remote.ReaderThread
_connectionHandler, _connectionListener, _in, _inputStream, _keepGoing
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void bsdHackRun()
          Look for null byte as message delimiter We'll also accept \n so we can test w/ telnet
 void normalRun()
           
static java.lang.String stripXML(java.lang.String msg)
          Discard XML wrapper
 
Methods inherited from class com.lyrisoft.chat.server.remote.ReaderThread
run
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_instream

protected java.io.InputStreamReader _instream
Input stream that we watch for new messages

XML_START

public static java.lang.String XML_START
String that starts XML wrapper

XML_END

public static java.lang.String XML_END
String that ends XML wrapper
Method Detail

normalRun

public void normalRun()
Overrides:
normalRun in class ReaderThread

bsdHackRun

public void bsdHackRun()
Look for null byte as message delimiter We'll also accept \n so we can test w/ telnet
Overrides:
bsdHackRun in class ReaderThread

stripXML

public static java.lang.String stripXML(java.lang.String msg)
Discard XML wrapper
Parameters:
msg - The full message
Returns:
The message without XML in the format the rest of NFC likes to see


Copyright © 2000-2002 Taso Lyristis