Class SRMain

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

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

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

Variable Index

 o collName
The name of the data collection host.
 o collPort
The port number for connecting to the data collection host.
 o DEFAULT_PORT
The default data collection port number.
 o dispPort
The port number for the display program to connect to.
 o done
A flag for halting the socket relay.
 o servSocket
A socket for listening for connections from the display process.

Constructor Index

 o SRMain(String[])
Constructs a main thread for the socket relay.

Method Index

 o parseArgs(String[])
Parse the command-line arguments.
 o run()
Main line code for socket relay.

Variables

 o DEFAULT_PORT
 public static final int DEFAULT_PORT
The default data collection port number.

 o collName
 private String collName
The name of the data collection host.

 o collPort
 private int collPort
The port number for connecting to the data collection host.

 o dispPort
 private int dispPort
The port number for the display program to connect to.

 o servSocket
 private ServerSocket servSocket
A socket for listening for connections from the display process.

 o done
 private boolean done
A flag for halting the socket relay.

Constructors

 o SRMain
 public SRMain(String args[]) throws IOException, ParseException
Constructs a main thread for the socket relay.

Parameters:
args - command-line arguments passed to the application.
Throws: ParseException
if an invalid argument format or value is found.
Throws: IOException
if an I/O error occurs while creating a socket.

Methods

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

Overrides:
run in class Thread
 o parseArgs
 private void parseArgs(String args[]) throws ParseException
Parse the command-line arguments.

Parameters:
args - command-line arguments passed to the application.
Throws: ParseException
if an invalid argument format or value is found.