package edu.vt.marian.uip; import java.io.*; import java.net.*; import java.util.*; import edu.vt.marian.common.*; /** class name: add_receiver_thread class description: this thread will inform the server uip receiver table to add a new receiver
uses the services of class(es): designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): finished time: known bugs: JDK version: 1.1.5 side effects: */ public class add_receiver_thread extends Thread { /** this is just used for debugging */ Debug debug; /** this is the socket used to create a server uip receiver */ private Socket s; /** this is the version used to create a server uip receiver */ private int version; /** this is the receiver table which will be informed to add a new receiver */ private server_uip_receiver_table surt; /** method description: this constructor will create add_receiver_thread object based on the information specified in the parameters
uses the services of class(es): input parameter(s): surt -- the server uip receiver table used to add the receiver s -- the socket which will be used to create a receiver version -- the version used to create the receiver debug -- used for debugging output parameter(s): none return value: none synchronization consideration: none */ public add_receiver_thread(server_uip_receiver_table surt, Socket s, int version, Debug debug) { // no error checking, just set values here this.debug = debug; this.s = s; this.version = version; this.surt = surt; } /** method description: this method of the thread will inform the server_uip_receiver_table to add a new receiver
uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration: none */ public void run() { // implementation required surt.add_receiver_by_thread(s, version); } }