edu.iu.iv.common.util
Class AbstractBufferMonitor

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.iu.iv.common.util.AbstractBufferMonitor
All Implemented Interfaces:
java.lang.Runnable

public abstract class AbstractBufferMonitor
extends java.lang.Thread

Author:
Team IVC

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AbstractBufferMonitor(java.io.InputStream buffer)
           
 
Method Summary
 void run()
          Checks this monitor's buffer for new data every 100 ms and appends any it finds to the console.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractBufferMonitor

public AbstractBufferMonitor(java.io.InputStream buffer)
Parameters:
buffer - the buffer this monitor will watch
Method Detail

run

public void run()
Checks this monitor's buffer for new data every 100 ms and appends any it finds to the console. By using a short delay, we avoid calling append once for each character to be printed. If the vertical scroll bar is all the way down when new text is appended, it is autoscrolled to show the new text.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Runnable.run()