Class UpdateHandler

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----UpdateHandler

public class UpdateHandler
extends Thread
Class definition for a thread that reads from a socket and queues the objects it reads to a processing thread.

Version:
$Revision: 1.9 $, $Date: 2000/10/12 14:08:02 $
Author:
John Cavanaugh

Variable Index

 o done
A flag to signal that the thread should terminate.
 o mainThread
The main processing thread.
 o objStream
The input object stream.
 o stream
The original input stream.

Constructor Index

 o UpdateHandler(VisiMain, InputStream)
Constructs a ModelUpdate handler.

Method Index

 o halt()
Stops the thread.
 o run()
Reads objects from the input stream and pass them to the main processing thread.
 o toString()
Gets a string describing the update handler.

Variables

 o mainThread
 private VisiMain mainThread
The main processing thread.

 o stream
 private InputStream stream
The original input stream.

 o objStream
 private ObjectInputStream objStream
The input object stream.

 o done
 private boolean done
A flag to signal that the thread should terminate.

Constructors

 o UpdateHandler
 public UpdateHandler(VisiMain mainThread,
                      InputStream stream)
Constructs a ModelUpdate handler.

Parameters:
mainThread - the main line processing thread.
stream - an input stream.

Methods

 o run
 public void run()
Reads objects from the input stream and pass them to the main processing thread.

Overrides:
run in class Thread
 o halt
 public void halt()
Stops the thread.

 o toString
 public String toString()
Gets a string describing the update handler.

Returns:
a string describing the socket handler object.
Overrides:
toString in class Thread