Class SRWorker

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

public class SRWorker
extends Thread
Class definition for the main SocketRelay processing thread.

Version:
$Revision: 1.3 $, $Date: 2000/10/12 14:07:23 $
Author:
John Cavanaugh

Variable Index

 o BUFFER_SIZE
Size of buffer.
 o done
Flag indicating whether the worker is done.
 o instance
A counter to keep track of how many workers are created.
 o inStream
An input stream associated with a socket to the data collection source.
 o outStream
An output stream associated with the output socket provided by the SRMain object.
 o serial
A serial number used in debugging.

Constructor Index

 o SRWorker(Socket, String, int)
Constructs a socket relay worker.

Method Index

 o run()
Main line code for socket relay.

Variables

 o BUFFER_SIZE
 private static final int BUFFER_SIZE
Size of buffer.

 o done
 private boolean done
Flag indicating whether the worker is done.

 o inStream
 private InputStream inStream
An input stream associated with a socket to the data collection source.

 o outStream
 private OutputStream outStream
An output stream associated with the output socket provided by the SRMain object.

 o serial
 private int serial
A serial number used in debugging.

 o instance
 private static int instance
A counter to keep track of how many workers are created.

Constructors

 o SRWorker
 public SRWorker(Socket sock,
                 String collName,
                 int collPort) throws IOException
Constructs a socket relay worker.

Parameters:
sock - a socket connection to a display client.
Throws: IOException
if an I/O error is encountered.

Methods

 o run
 public void run()
Main line code for socket relay.

Overrides:
run in class Thread