webtester.packages.distributed
Class distServer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--webtester.packages.distributed.distServer
All Implemented Interfaces:
java.lang.Runnable

public class distServer
extends java.lang.Thread

The server component for the distributed GUI.

Author:
Aaron DeLong

Field Summary
private  java.net.ServerSocket acceptor
          The server socket instance that accepts new connections.
private  boolean bConfigLoaded
          Indicates whether a configuration file is loaded.
private  boolean bMaster
          Indicates if this is a master server or not.
private  java.lang.String sConfigFile
          Configuration file that was loaded.
private  javax.swing.JTextArea text
          TextArea used to show info to user.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
distServer(int iPort)
          The constructor, which requires the port number as an argument.
 
Method Summary
private  void processClientRequest(java.net.Socket client)
          Passes the client socket to the proper handler
 void run()
          The main entry point into this class, executed by the calling thread.
 void setConfigFile(java.lang.String sStr)
          Set the name of the config file that was loaded.
 void setConfigLoaded(boolean bVal)
           
 void setMaster(boolean bVal)
          Set the value which indicates if this is a master server.
 void setTextArea(javax.swing.JTextArea jtext)
          Set the textarea used to display info to user.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

acceptor

private java.net.ServerSocket acceptor
The server socket instance that accepts new connections.


bMaster

private boolean bMaster
Indicates if this is a master server or not.


bConfigLoaded

private boolean bConfigLoaded
Indicates whether a configuration file is loaded.


sConfigFile

private java.lang.String sConfigFile
Configuration file that was loaded.


text

private javax.swing.JTextArea text
TextArea used to show info to user.

Constructor Detail

distServer

public distServer(int iPort)
The constructor, which requires the port number as an argument.

Parameters:
iPort - the port number on which the server should listen
Method Detail

setMaster

public void setMaster(boolean bVal)
Set the value which indicates if this is a master server.

Parameters:
bVal - indicates whether this is a master server

setTextArea

public void setTextArea(javax.swing.JTextArea jtext)
Set the textarea used to display info to user.

Parameters:
jtext - the textarea

setConfigLoaded

public void setConfigLoaded(boolean bVal)

setConfigFile

public void setConfigFile(java.lang.String sStr)
Set the name of the config file that was loaded.

Parameters:
sStr - the config file that was loaded

processClientRequest

private void processClientRequest(java.net.Socket client)
Passes the client socket to the proper handler

Parameters:
client - the incoming client socket

run

public void run()
The main entry point into this class, executed by the calling thread.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread