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
-
collName
- The name of the data collection host.
-
collPort
- The port number for connecting to the data collection host.
-
DEFAULT_PORT
- The default data collection port number.
-
dispPort
- The port number for the display program to connect to.
-
done
- A flag for halting the socket relay.
-
servSocket
- A socket for listening for connections from the display process.
-
SRMain(String[])
- Constructs a main thread for the socket relay.
-
parseArgs(String[])
- Parse the command-line arguments.
-
run()
- Main line code for socket relay.
DEFAULT_PORT
public static final int DEFAULT_PORT
- The default data collection port number.
collName
private String collName
- The name of the data collection host.
collPort
private int collPort
- The port number for connecting to the data collection host.
dispPort
private int dispPort
- The port number for the display program to connect to.
servSocket
private ServerSocket servSocket
- A socket for listening for connections from the display process.
done
private boolean done
- A flag for halting the socket relay.
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.
run
public void run()
- Main line code for socket relay.
- Overrides:
- run in class Thread
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.