package edu.vt.marian.server; import java.io.*; import java.net.*; import java.lang.*; import java.util.*; import edu.vt.marian.common.*; import edu.vt.marian.uip.*; /** class name: session_table_process_call_from_session_to_client_thread class description: this thread is simply used to avoid deadlock, it will simply call the method process_call_from_session_to_client_by_thread (...), since this method need to be synchronized and yet it's called in call loop backs, using a thread can avoid possible deadlock here
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 session_table_process_call_from_session_to_client_thread extends Thread { /** this is the object whichj created this object */ private session_table my_st = null; /** this is the id of the session */ private int session_id = -1; /** this is the rpc_function which need to be passed to client */ private rpc_function rf = null; /** this is just used for debugging */ Debug debug; /** method description: this constructor will create a session table object, this object is created by the specified session manager object and the specified directory contains all the configuration information about this object
uses the services of class(es): input parameter(s): st -- this is the session table which created this thread session_id -- identifies the session which called the session_table's method process_call_from_session_to_client(...) rf -- the rpc_function sent by the session debug -- used for debugging output parameter(s): none return value: none */ public session_table_process_call_from_session_to_client_thread( session_table st, int session_id, rpc_function rf, Debug debug) { this.debug = debug; my_st = st; this.rf = rf; this.session_id = session_id; } /** method description: this method will simply call the session_table's method process_call_from_session_to_client_by_thread(...)
uses the services of class(es): input parameter(s): none output parameter(s): none return value: the current number of sessions in this table as an integer */ public void run() { my_st.process_call_from_session_to_client_by_thread(session_id, rf); return; } }