|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--edu.vt.marian.uip.server_uip_receiver_table
class name: server_uip_receiver_table class description: this class is responsible to create, delete and manage a number of server_uip_receivers, it's responsible to pass rpc_functions to them to pass to corresponding client_uips, it's also responsible for receiving rpc_functions received by them from client_uips.
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:
| Field Summary | |
static int |
INVALID_ID
|
static int |
NULL_FUNCTION
|
static int |
NULL_MESSAGE
|
static int |
NULL_SOCKET
|
static int |
OK
possible return values of methods |
static int |
PASSING_FUNCTION_FAILED
|
static int |
PROCESS_CALL_BACK_FAILED
|
static int |
RECEIVER_NOT_FOUND
|
static int |
TEABLE_OVERFLOW
|
| Constructor Summary | |
server_uip_receiver_table(server_uip_thread sut,
int max_client_number,
edu.vt.marian.common.Debug debug)
method description: this constructor will create a server_uip_receiver _table object based on teh information in the parameters uses the services of class(es): input parameter(s): sut -- the server_uip_thread which created this object max_client_number -- specifies at most how many server_uip_receivers are allowed in this object debug -- used for debugging output parameter(s): none return value: none synchronization consideration: none |
|
| Method Summary | |
int |
add_receiver_by_thread(java.net.Socket s,
int version)
method description: this method will create a new server_uip_receiver based on the information in the parameters uses the services of class(es): input parameter(s): s -- the socket used to communicate with the client_uip version -- specifies how to pass rpc_functions to and receive rpc_functions from the client_uip output parameter(s): none return value: 0 -- the server_uip_receiver has been created successfully other -- synchronization consideration: this is a writer method since it will modify the receiver table |
int |
add_receiver(java.net.Socket s,
int version)
method description: this method will create a new server_uip_receiver based on the information in the parameters uses the services of class(es): input parameter(s): s -- the socket used to communicate with the client_uip version -- specifies how to pass rpc_functions to and receive rpc_functions from the client_uip output parameter(s): none return value: 0 -- the server_uip_receiver has been created successfully other -- synchronization consideration: this is a writer method since it will modify the receiver table |
int |
clean()
method description: this method will delete those server_uip_receivers whose status is not "ok" uses the services of class(es): input parameter(s): none output parameter(s): none return value: non negative integer -- specifies how many server_uip_receivers have been deleted other -- synchronization consideration: this is a writer method since it will modify the receiver table |
int |
exit(java.lang.String condition)
method description: this method will let this object exit smoothly uses the services of class(es): input parameter(s): consideration -- specifies the situation under which this method is called output parameter(s): none return value: 0 -- the exit is smooth other -- synchronization consideration: this is a writer method since it will modify the receiver table (delete all the elements) |
int |
log_data_from_server_uip_receiver(int client_id,
java.lang.String message)
method description: this method will process the log data sent from a server_uip_receiver uses the services of class(es): input parameter(s): client_id -- indicate which receiver send the message message -- the message sent from the server_uip_receiver output parameter(s): none return value: 0 -- the message has been processed successfully other -- synchronization consideration: none |
int |
process_call_back_from_server_uip_receiver(int client_id,
java.lang.String client_desc,
rpc_function function)
method description: this method will process the function received by one of it's server_uip_receivers a from client_uip uses the services of class(es): input parameter(s): client_id -- specifies which server_uip_receiver received this function client_desc -- a description of the client_uip which sent this function output parameter(s): none return value: 0 -- the function has been processed successfully other -- synchronization consideration: none |
int |
rpc_call(int client_id,
rpc_function function)
method description: this method will send the function to the corresponding server_uip_receiver to pass to the client_uip uses the services of class(es): input parameter(s): client_id -- specifies which server_uip_receiver to pass the function to function -- the function which need to be passed output parameter(s): none return value: 0 -- the function has been passed correctly other -- synchronization consideration: this is a reader method since it will search the receiver table |
| 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 NULL_SOCKET
public static final int TEABLE_OVERFLOW
public static final int INVALID_ID
public static final int PASSING_FUNCTION_FAILED
public static final int RECEIVER_NOT_FOUND
public static final int NULL_FUNCTION
public static final int PROCESS_CALL_BACK_FAILED
public static final int NULL_MESSAGE
| Constructor Detail |
public server_uip_receiver_table(server_uip_thread sut,
int max_client_number,
edu.vt.marian.common.Debug debug)
uses the services of class(es): input parameter(s): sut -- the server_uip_thread which created this object max_client_number -- specifies at most how many server_uip_receivers are allowed in this object debug -- used for debugging output parameter(s): none return value: none synchronization consideration: none
| Method Detail |
public int add_receiver(java.net.Socket s,
int version)
uses the services of class(es): input parameter(s): s -- the socket used to communicate with the client_uip version -- specifies how to pass rpc_functions to and receive rpc_functions from the client_uip output parameter(s): none return value: 0 -- the server_uip_receiver has been created successfully other -- synchronization consideration: this is a writer method since it will modify the receiver table
public int add_receiver_by_thread(java.net.Socket s,
int version)
uses the services of class(es): input parameter(s): s -- the socket used to communicate with the client_uip version -- specifies how to pass rpc_functions to and receive rpc_functions from the client_uip output parameter(s): none return value: 0 -- the server_uip_receiver has been created successfully other -- synchronization consideration: this is a writer method since it will modify the receiver table
public int clean()
uses the services of class(es): input parameter(s): none output parameter(s): none return value: non negative integer -- specifies how many server_uip_receivers have been deleted other -- synchronization consideration: this is a writer method since it will modify the receiver table
public int rpc_call(int client_id,
rpc_function function)
uses the services of class(es): input parameter(s): client_id -- specifies which server_uip_receiver to pass the function to function -- the function which need to be passed output parameter(s): none return value: 0 -- the function has been passed correctly other -- synchronization consideration: this is a reader method since it will search the receiver table
public int exit(java.lang.String condition)
uses the services of class(es): input parameter(s): consideration -- specifies the situation under which this method is called output parameter(s): none return value: 0 -- the exit is smooth other -- synchronization consideration: this is a writer method since it will modify the receiver table (delete all the elements)
public int process_call_back_from_server_uip_receiver(int client_id,
java.lang.String client_desc,
rpc_function function)
uses the services of class(es): input parameter(s): client_id -- specifies which server_uip_receiver received this function client_desc -- a description of the client_uip which sent this function output parameter(s): none return value: 0 -- the function has been processed successfully other -- synchronization consideration: none
public int log_data_from_server_uip_receiver(int client_id,
java.lang.String message)
uses the services of class(es): input parameter(s): client_id -- indicate which receiver send the message message -- the message sent from the server_uip_receiver output parameter(s): none return value: 0 -- the message has been processed successfully other -- synchronization consideration: none
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||