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
-
BUFFER_SIZE
- Size of buffer.
-
done
- Flag indicating whether the worker is done.
-
instance
- A counter to keep track of how many workers are created.
-
inStream
- An input stream associated with a socket to the
data collection source.
-
outStream
- An output stream associated with the output socket
provided by the SRMain object.
-
serial
- A serial number used in debugging.
-
SRWorker(Socket, String, int)
- Constructs a socket relay worker.
-
run()
- Main line code for socket relay.
BUFFER_SIZE
private static final int BUFFER_SIZE
- Size of buffer.
done
private boolean done
- Flag indicating whether the worker is done.
inStream
private InputStream inStream
- An input stream associated with a socket to the
data collection source.
outStream
private OutputStream outStream
- An output stream associated with the output socket
provided by the SRMain object.
serial
private int serial
- A serial number used in debugging.
instance
private static int instance
- A counter to keep track of how many workers are created.
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.
run
public void run()
- Main line code for socket relay.
- Overrides:
- run in class Thread