com.ibm.tspaces.examples.services
Class Demo.ActionThread.Listener

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.ibm.tspaces.examples.services.Demo.ActionThread.Listener
Enclosing class:
Demo.ActionThread

public class Demo.ActionThread.Listener
extends java.lang.Thread

This inner class listens to the output from a program and displays it.

Author:
Joseph Gebis
See Also:
ActionThread, Demo

Field Summary
 boolean ready
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Demo.ActionThread.Listener(java.io.InputStream istream, java.io.OutputStream ostream)
          Constructor
Demo.ActionThread.Listener(java.io.InputStream istream, java.io.OutputStream ostream, java.lang.String name)
          Constructor
 
Method Summary
 void finish()
          Cleans up.
 void run()
          The heart of the listener class.
 
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

ready

public boolean ready
Constructor Detail

Demo.ActionThread.Listener

public Demo.ActionThread.Listener(java.io.InputStream istream,
                                  java.io.OutputStream ostream)
Constructor
Parameters:
istream - the input stream to listen to
ostream - the output stream to send to

Demo.ActionThread.Listener

public Demo.ActionThread.Listener(java.io.InputStream istream,
                                  java.io.OutputStream ostream,
                                  java.lang.String name)
Constructor
Parameters:
istream - the input stream to listen to
ostream - the output stream to print to
name - the name of the program we are listening to
Method Detail

finish

public void finish()
Cleans up.

run

public void run()
The heart of the listener class.
Overrides:
run in class java.lang.Thread