stella.telescope
Class OpenPilarSocket.TplHandler

java.lang.Object
  extended by java.lang.Thread
      extended by stella.telescope.OpenPilarSocket.TplHandler
All Implemented Interfaces:
Runnable
Enclosing class:
OpenPilarSocket

private class OpenPilarSocket.TplHandler
extends Thread

A thread that permanently moitors the incoming stream for replies sent by the socket.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  BufferedReader input
          The input stream to monitor.
private  TplListener listener
          The tpl-event listener the parsed replies are delivered to.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected OpenPilarSocket.TplHandler(BufferedReader line, TplListener pilar)
          Constructs and starts a new listener thread.
 
Method Summary
 void run()
          Runs the listener thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

input

private BufferedReader input
The input stream to monitor.


listener

private TplListener listener
The tpl-event listener the parsed replies are delivered to.

Constructor Detail

OpenPilarSocket.TplHandler

protected OpenPilarSocket.TplHandler(BufferedReader line,
                                     TplListener pilar)
Constructs and starts a new listener thread. Any available data is parsed into a TplEvent and sent to the single listener.

Method Detail

run

public void run()
Runs the listener thread. We wait for input until data is available and then parse it.

Specified by:
run in interface Runnable
Overrides:
run in class Thread