package edu.vt.marian.server; import java.io.*; import java.net.*; import java.lang.*; import java.util.*; import edu.vt.marian.common.*; /** class name: session_table_entry class description: this class represents an entry in the session table, it has three elements: client id, user id and session. uses the services of class(es): designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Ning Chai (nchai@csgrad.cs.vt.edu) finished time: Nov 26th, 1998 known bugs: JDK version: 1.1.5 side effects: */ public class session_table_entry { public final static int OK = 0; private int client_id; private int user_id; private session s; /** this is just used for debugging */ Debug debug; /** method description: this constructor will create a session table entry object based on the client id, user id and session object. uses the services of class(es): none input parameter(s): client_id -- this is the first element of this object user_id -- this is the second element of this object sesson -- this is the third element of this object debug -- used for debugging output parameter(s): none return value: none synchronization: none */ public session_table_entry(int client_id, int user_id, session s, Debug debug) { this.debug = debug; set_client_id(client_id); set_user_id(user_id); set_session(s); } /** method description: this method will return the client id of this object uses the services of class(es): none input parameter(s): none output parameter(s): none return value: the client id of this object as an integer synchronization: none */ public int get_client_id() { return client_id; } /** method description: this method will return the user id of this object. uses the services of class(es): none input parameter(s): none output parameter(s): none return value: the user id of this object as an integer synchronization: none */ public int get_user_id() { return user_id; } /** method description: this method will return the session object of this object uses the services of class(es): none input parameter(s): none output parameter(s): none return value: the sesson object of this object synchronization: none */ public session get_session() { return s; } /** method description: this method will set the client id of this object. uses the services of class(es): none input parameter(s): client_id -- this will become the new client iod of this object output parameter(s): none return value: OK -- the new client id has been set correctly synchronization: none */ private int set_client_id(int client_id) { this.client_id = client_id; return OK; } /** method description: this method will set the user id of this object. uses the services of class(es): none input parameter(s): user_id -- this will become the new user id of this object output parameter(s): none return value: OK -- the new user id has been set correctly synchronization: none */ private int set_user_id(int user_id) { this.user_id = user_id; return OK; } /** method description: this method will set the session object of this object. uses the services of class(es): none input parameter(s): s -- this will become the new session object of this object output parameter(s): none return value: OK -- the new session object has been set correctly synchronization: none */ private int set_session(session s) { this.s = s; return OK; } }