|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.server.session
class name: session class description: this class represents a session in the system, currently a session represent a user's activity in a period of time. 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:
| Field Summary | |
static int |
C_QUEUE_SIZE_NOT_EQUAL_0
|
static int |
CANNOT_FIND_QUERY
|
static int |
CLIENT_AND_C_QUEUES_SIZE_NOT_EQUAL_0
|
static int |
CLIENT_QUEUE_SIZE_NOT_EQUAL_0
|
static int |
INVALID_MAX_NUMBER_QUERIES
|
static int |
INVALID_PARAMETER_TYPE
|
static int |
INVALID_SESSION_ID
|
static int |
NULL_MESSAGE
|
static int |
NULL_PARAMETER
|
static int |
NULL_RPC_FUNCTION
|
static int |
NULL_RPC_FUNCTION_NAME
|
static int |
OK
|
static int |
PROCESS_CALL_FROM_C_FAILED
|
static int |
PROCESS_CALL_FROM_CLIENT_FAILED
|
static int |
PROCESS_CALL_FROM_SESSION_TO_C_FAILED
|
static int |
PROCESS_CALL_FROM_SESSION_TO_CLIENT_FAILED
|
static int |
PROCESS_ERROR_FOR_SESSION_MANAGER_FAILED
|
static int |
PROCESS_FUNCTION_FROM_C_FAILED
|
static int |
PROCESS_FUNCTION_FROM_CLIENT_FAILED
|
static int |
PROCESS_SHOW_INFORMATION_1_FAILED
|
static int |
QUERIES_OVERFLOW
|
| Constructor Summary | |
session(session_table st,
int session_id,
resource_manager rm,
edu.vt.marian.common.Debug debug)
method description: this constructor will create a session object, this session belongs to the specified session table, has the specified id and will use the specified resource manager. |
|
session(session_table st,
int session_id,
java.lang.String dir_name,
resource_manager rm,
edu.vt.marian.common.Debug debug)
method description: this constructor will create a session object, this session belongs to the specified session table, has the specified id and will use the specified resource manager, the directory/file contains all the configuration information for this session. |
|
| Method Summary | |
int |
execute_next_call_from_c()
method description: this method will take out a function from C/C++ server function queue and pass it to corresponding query object to process uses the services of class(es): input parameter(s): none output parameter(s): none return value: OK -- a function has been taken out from queue and processed by the corresponding query correctly NULL_RPC_FUNCTION -- the queue is empty NULL_RPC_FUNCTION_NAME -- the rpc_function's name is null NULL_PARAMETER -- the parameter of rpc_function is null INVALID_PARAMETER_TYPE -- the parameter's type of rpc_function is invalid PROCESS_SHOW_INFORMATION_1_FAILED -- error happens when query process the function "show_information_1" PROCESS_FUNCTION_FROM_C_FAILED -- error happens when query process the function CANNOT_FIND_QUERY -- invalid query id PROCESS_ERROR_FOR_SESSION_MANAGER_FAILED -- error happens when session process the function synchronization: synchronized |
int |
execute_next_call_from_client()
method description: this method will take out a function from the client function queue and pass it to corresponding query object to process uses the services of class(es): input parameter(s): none output parameter(s): none return value: OK -- a function has been taken out from queue and processed by the corresponding query correctly NULL_RPC_FUNCTION -- the queue is empty NULL_PARAMETER -- No parameter is found in the rpc_function INVALID_PARAMETER_TYPE -- The parameter's type of rpc_function is invalid PROCESS_FUNCTION_FROM_CLIENT_FAILED -- error happens when query process the function QUERIES_OVERFLOW -- Queries overflowed synchronization: synchronized |
int |
exit(java.lang.String condition)
method description: this method will let the session object exit smoothly, release the resources it occupied and kill all the threads it created. |
int |
get_id()
method description: this method will return the id of this session object. |
long |
get_inactive_time()
method description: this method will return the inactive time of this session object, this is the time interval between the last time a function is processed and the time this method is called. |
int |
get_max_number_queries()
method description: this method will return the possible maximum number of queries allowed in this object uses the services of class(es): none input parameter(s): none output parameter(s): none return value: the maximum possible number of queries allowed in this session object as an integer synchronization: none |
int |
get_number_queries()
method description: this method will return the number of queries currently in this session object. |
int |
get_number_unprocessed_call_from_c()
method description: this method will tell the current number of functions in the C/C++ server function queue. |
int |
get_number_unprocessed_call_from_client()
method description: this method will tell the current number of functions in the client function queue. |
int |
log_data_from_query(int log_level,
int query_id,
java.lang.String message)
method description: this method log the data sent from the specified query of this session uses the services of class(es): none input parameter(s): log_level -- specifies the depth of the message, 1 means it's the query itself query_id -- identifies the query sent the message message message -- the message the query want the session to log generator relative to the session output parameter(s): none return value: OK -- the message has been logged correctly other -- synchronization: none |
int |
process_call_from_c(edu.vt.marian.uip.rpc_function rf)
method description: this method will process the function sent from C/C++ marian server, in fact it just put the function into the corresponding function queue uses the services of class(es): input parameter(s): rf -- the rpc function need to be processed output parameter(s): none return value: OK -- the function has been processed correctly PROCESS_CALL_FROM_C_FAILED -- can not enter the function into the queue because the queue overflowed other -- synchronization: none |
int |
process_call_from_client(edu.vt.marian.uip.rpc_function rf)
method description: this method will process the function sent from client (currently webgate), in fact it just put the function into the corresponding queue object it created uses the services of class(es): input parameter(s): rf -- the rpc function need to be processed output parameter(s): none return value: OK -- the function has been processed correctly PROCESS_CALL_FROM_CLIENT_FAILED -- client function queue overflowed synchronization: none |
int |
process_call_from_query_to_c(int query_id,
edu.vt.marian.uip.rpc_function rf)
method description: this method will process the function sent from one of its query object to C/C++ marian server, in fact it just insert the query id to the function and then pass it to session manager. |
int |
process_call_from_query_to_client(int query_id,
edu.vt.marian.uip.rpc_function rf)
method description: this method will process the function sent from one of it's query object to client (currently webgate), in fact it just insert the query id in the function and then pass it to session manager. |
int |
set_max_number_queries(int number)
method description: this method will set the maximum possible number of queries allowed in this session object. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final int OK
public static final int CLIENT_QUEUE_SIZE_NOT_EQUAL_0
public static final int C_QUEUE_SIZE_NOT_EQUAL_0
public static final int CLIENT_AND_C_QUEUES_SIZE_NOT_EQUAL_0
public static final int PROCESS_CALL_FROM_SESSION_TO_C_FAILED
public static final int PROCESS_CALL_FROM_CLIENT_FAILED
public static final int PROCESS_CALL_FROM_C_FAILED
public static final int NULL_RPC_FUNCTION
public static final int NULL_PARAMETER
public static final int INVALID_PARAMETER_TYPE
public static final int PROCESS_FUNCTION_FROM_CLIENT_FAILED
public static final int PROCESS_FUNCTION_FROM_C_FAILED
public static final int NULL_RPC_FUNCTION_NAME
public static final int PROCESS_ERROR_FOR_SESSION_MANAGER_FAILED
public static final int PROCESS_SHOW_INFORMATION_1_FAILED
public static final int CANNOT_FIND_QUERY
public static final int PROCESS_CALL_FROM_SESSION_TO_CLIENT_FAILED
public static final int INVALID_SESSION_ID
public static final int INVALID_MAX_NUMBER_QUERIES
public static final int QUERIES_OVERFLOW
public static final int NULL_MESSAGE
| Constructor Detail |
public session(session_table st,
int session_id,
java.lang.String dir_name,
resource_manager rm,
edu.vt.marian.common.Debug debug)
public session(session_table st,
int session_id,
resource_manager rm,
edu.vt.marian.common.Debug debug)
| Method Detail |
public long get_inactive_time()
public int exit(java.lang.String condition)
public int process_call_from_client(edu.vt.marian.uip.rpc_function rf)
public int process_call_from_c(edu.vt.marian.uip.rpc_function rf)
public int execute_next_call_from_client()
public int execute_next_call_from_c()
public int get_number_unprocessed_call_from_client()
public int get_number_unprocessed_call_from_c()
public int process_call_from_query_to_client(int query_id,
edu.vt.marian.uip.rpc_function rf)
public int process_call_from_query_to_c(int query_id,
edu.vt.marian.uip.rpc_function rf)
public int get_id()
public int get_number_queries()
public int get_max_number_queries()
public int set_max_number_queries(int number)
public int log_data_from_query(int log_level,
int query_id,
java.lang.String message)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||