package edu.vt.marian.uip; import java.io.*; import java.net.*; import java.util.*; import edu.vt.marian.common.*; /** class name: server_uip_receiver_manage class description: this thread is responsible for informing the server_uip _receiver_table to delete server_uip_receivers whose status is not "ok" from time to time.

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 server_uip_receiver_manage extends Thread { /** this is just used for debugging */ Debug debug; /** this is the server uip receiver table which will be informed to clean bad receivers from time to time by this object */ private server_uip_receiver_table surt; /** currently, this value is the time interval that this object will inform receiver table to clean bad receivers */ private int check_interval = 420000; /** method description: this constructor will create a server_uip_receiver _manage object.

uses the services of class(es): input parameter(s): surt -- the server_uip_receiver_table which created this object debug -- used for debugging output parameter(s): none return value: none synchronization consideration: none */ public server_uip_receiver_manage(server_uip_receiver_table surt, Debug debug) { this.debug = debug; if (surt == null) { debug.dumpTrace("class server_uip_receiver_manage, constructor, parameter server_uip_receiver_table is null"); return; } this.surt = surt; return; } /** method description: this method of the thread will inform server_uip_ receiver_table to delete server_uip_receivers whose status is not "ok" from time to time.

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 while (true) { // first sleep some time try { sleep(check_interval); } catch (Exception e) { debug.dumpTrace("class server_uip_receiver_manage, method run, error happened when sleeping"); return; } // then inform the server uip receiver table to delete bad // receivers surt.clean(); } } }