|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.lang.Thread
|
+--edu.vt.marian.uip.server_uip_receiver
class name: server_uip_receiver class description: this class is responsible to communicate with one client_uip, send rpc_function to and receive rpc_function from it through sockets
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 |
ACK_TIMEOUT
|
static int |
CLIENT_DISCONNECTED
|
static int |
ERROR_CONNECT_TO_CLIENT
|
static int |
ERROR_CREATE_STREAM
|
static int |
ERROR_SET_SOCKET_TIMEOUT
|
static int |
EXIT
|
static int |
INVALID_PARAMETER
|
static int |
NAK
those are possible method return values |
static int |
NEW_SESSION_ERROR
|
static int |
OK
those are possible status |
static int |
READ_ACK_ERROR
|
static int |
READ_FUNCTION_ERROR
|
static int |
SEND_FUNCTION_ERROR
|
static int |
WRITE_ERROR
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
| Constructor Summary | |
server_uip_receiver(server_uip_receiver_table surt,
int client_id,
java.net.Socket s,
int version,
edu.vt.marian.common.Debug debug)
method description: this constructor will create a server_uip_receiver object based on the information in the parameters. |
|
| Method Summary | |
int |
exit(java.lang.String condition)
method description: this method will let the object exit smoothly. |
int |
get_client_id()
method description: this method will return the id of this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: the id of this object as an integer synchronization consideration: none |
int |
get_status()
method description: this method will return the current status of this object uses the services of class(es): input parameter(s): none output parameter(s): none return value: 0 -- every thing is fine other -- synchronization consideration: none |
int |
rpc_call(rpc_function rf)
method description: this method will pass the rpc_function to the client_uip through socket uses the services of class(es): input parameter(s): rf -- the function need to be passed to the client_uip output parameter(s): none return value: none synchronization consideration: this is a synchronized method since it will write something to the socket and wait for reply |
void |
run()
method description: this method of the thread will keep on reading rpc_functions from the socket connected to the client_uip. |
| Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int OK
public static final int INVALID_PARAMETER
public static final int NEW_SESSION_ERROR
public static final int ERROR_CONNECT_TO_CLIENT
public static final int CLIENT_DISCONNECTED
public static final int READ_ACK_ERROR
public static final int SEND_FUNCTION_ERROR
public static final int ACK_TIMEOUT
public static final int WRITE_ERROR
public static final int EXIT
public static final int ERROR_CREATE_STREAM
public static final int ERROR_SET_SOCKET_TIMEOUT
public static final int READ_FUNCTION_ERROR
public static final int NAK
| Constructor Detail |
public server_uip_receiver(server_uip_receiver_table surt,
int client_id,
java.net.Socket s,
int version,
edu.vt.marian.common.Debug debug)
uses the services of class(es): input parameter(s): surt -- the server_uip_receiver_table which created this object cleint_id -- used to identify this object in the server_uip_receiver _table s -- socket used to communicate with the client_uip version -- specifies how to pass and receive rpc_functions through sockets debug -- used for debugging output parameter(s): none return value: none synchronization consideration: none
| Method Detail |
public void run()
uses the services of class(es): input parameter(s): none output parameter(s): none return value: none synchronization consideration: none
public int rpc_call(rpc_function rf)
uses the services of class(es): input parameter(s): rf -- the function need to be passed to the client_uip output parameter(s): none return value: none synchronization consideration: this is a synchronized method since it will write something to the socket and wait for reply
public int exit(java.lang.String condition)
uses the services of class(es): input parameter(s): condition --- under what condition is this method is called output parameter(s): none return value: 0 -- every thing is fine other -- synchronization consideration: none
public int get_status()
uses the services of class(es): input parameter(s): none output parameter(s): none return value: 0 -- every thing is fine other -- synchronization consideration: none
public int get_client_id()
uses the services of class(es): input parameter(s): none output parameter(s): none return value: the id of this object as an integer synchronization consideration: none
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||