qat.agent
Class ReaderThread

java.lang.Object
  extended byjava.lang.Thread
      extended byqat.agent.ReaderThread
All Implemented Interfaces:
java.lang.Runnable

public class ReaderThread
extends java.lang.Thread

This class is used to allow reading of streams without the risk of blocking thread execution.


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReaderThread(java.lang.String name, java.io.InputStream s, boolean mode, java.io.File traceFileName)
          Constructs a stream reader, and gets ready to read it.
 
Method Summary
 void interrupt()
          This method causes this object instance to stop excuting, and frees all the resources associated with this stream reader.
 void run()
          This starts reading the actual thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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
 

Constructor Detail

ReaderThread

public ReaderThread(java.lang.String name,
                    java.io.InputStream s,
                    boolean mode,
                    java.io.File traceFileName)
             throws java.io.IOException
Constructs a stream reader, and gets ready to read it.

Parameters:
s - - the stream we want to read
Method Detail

run

public void run()
This starts reading the actual thread. Do not call this method directly, but use ObjectName.start() to start this thread correctly.


interrupt

public void interrupt()
This method causes this object instance to stop excuting, and frees all the resources associated with this stream reader.



See QAT project for licensing details