edu.vt.marian.uip
Class client_uip_thread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.vt.marian.uip.client_uip_thread

public class client_uip_thread
extends java.lang.Thread

class name: client_uip_thread class description: this class is responsible to create the connection with the server part, and do the actural function passing through the network uses the services of class(es): debug, client_uip, uip_server, rpc_function designer(s): Jianxin Zhao (jxzhao@csgrad.cs.vt.edu) implementator(s): Xuelei Sun (xusun@csgrad.cs.vt.edu) finished time: December 8, 1998 known bugs: JDK version: 1.1.5 side effects:


Field Summary
static int CREATE_OUTBOUND_STREAM_FAILED
           
static int ERROR_CREAT_LISTEN_SOCKET
           
static int ERROR_CREATE_OUTBOUND_SOCKET
           
static int ERROR_READ_FUNCTION_FROM_SERVER
           
static int ERROR_SET_SOCKET_TIME_OUT
           
static int ERROR_WRITE_ACK
           
static int EXIT
           
static int INVALID_FUNCTION
           
static int INVALID_VERSION
           
static int LISTEN_FAILED
           
static int LISTEN_TIME_OUT
           
static int NEW_SESSION_NOT_SENT
           
static int NULL_FUNCTION
           
static int NULL_PARAMETER
           
static int OK
           
static int RECEIVE_ACK_ERROR
           
static int REPLY_NOT_ACK
           
static int SEND_FUNCTION_FAILED
           
static int SERVER_DISCONNECT
           
static int TIME_OUT_WAITING_ACK
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
client_uip_thread(client_uip cu, uip_server us, int version, edu.vt.marian.common.Debug debug)
          method description: this constructor will create a client_uip_thread object based on the information given by the parameters uses the services of class(es): Debug, client_uip, uip_server input parameter(s): client_uip cu, the client uip which the creates the thread uip_server us, the uip server which stores the information of the server int version, the connection version, 1 hard coded, 2 flexible Debug debug, debug object output parameter(s): none return value: none synchronization consideration: none
 
Method Summary
 int exit(java.lang.String condition)
          method description: this method provide the smooth exit of the thread uses the services of class(es): Debug, rpc_function input parameter(s): String condition output parameter(s): none return value: int OK synchronization consideration: none
 int get_status()
          method description: this method return current status uses the services of class(es): none input parameter(s): none output parameter(s): none return value: none synchronization consideration: none
 int rpc_call(rpc_function rf)
          method description: this method do the actural function passing from client to server uses the services of class(es): rpc_function, debug input parameter(s): rpc_function rf; output parameter(s): none return value: OK NULL_FUNCTION INVALID_FUNCTION OUTBOUND_STREAM_CREATE_FAILED SEND_FUNCTION_FAILED RECEIVE_ACK_ERROR REPLY_NOT_ACK TIME_OUT_WAITING_ACK synchronization consideration: synchronized
 void run()
          method description: this method do the actural function receiving from server to client uses the services of class(es): rpc_function, debug input parameter(s): none; output parameter(s): none return value: none synchronization consideration: none
 
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

OK

public static final int OK

NULL_PARAMETER

public static final int NULL_PARAMETER

INVALID_VERSION

public static final int INVALID_VERSION

ERROR_CREAT_LISTEN_SOCKET

public static final int ERROR_CREAT_LISTEN_SOCKET

ERROR_SET_SOCKET_TIME_OUT

public static final int ERROR_SET_SOCKET_TIME_OUT

ERROR_CREATE_OUTBOUND_SOCKET

public static final int ERROR_CREATE_OUTBOUND_SOCKET

NEW_SESSION_NOT_SENT

public static final int NEW_SESSION_NOT_SENT

LISTEN_TIME_OUT

public static final int LISTEN_TIME_OUT

LISTEN_FAILED

public static final int LISTEN_FAILED

CREATE_OUTBOUND_STREAM_FAILED

public static final int CREATE_OUTBOUND_STREAM_FAILED

SEND_FUNCTION_FAILED

public static final int SEND_FUNCTION_FAILED

REPLY_NOT_ACK

public static final int REPLY_NOT_ACK

RECEIVE_ACK_ERROR

public static final int RECEIVE_ACK_ERROR

TIME_OUT_WAITING_ACK

public static final int TIME_OUT_WAITING_ACK

ERROR_READ_FUNCTION_FROM_SERVER

public static final int ERROR_READ_FUNCTION_FROM_SERVER

SERVER_DISCONNECT

public static final int SERVER_DISCONNECT

EXIT

public static final int EXIT

NULL_FUNCTION

public static final int NULL_FUNCTION

INVALID_FUNCTION

public static final int INVALID_FUNCTION

ERROR_WRITE_ACK

public static final int ERROR_WRITE_ACK
Constructor Detail

client_uip_thread

public client_uip_thread(client_uip cu,
                         uip_server us,
                         int version,
                         edu.vt.marian.common.Debug debug)
method description: this constructor will create a client_uip_thread object based on the information given by the parameters uses the services of class(es): Debug, client_uip, uip_server input parameter(s): client_uip cu, the client uip which the creates the thread uip_server us, the uip server which stores the information of the server int version, the connection version, 1 hard coded, 2 flexible Debug debug, debug object output parameter(s): none return value: none synchronization consideration: none
Method Detail

exit

public int exit(java.lang.String condition)
method description: this method provide the smooth exit of the thread uses the services of class(es): Debug, rpc_function input parameter(s): String condition output parameter(s): none return value: int OK synchronization consideration: none

get_status

public int get_status()
method description: this method return current status uses the services of class(es): none input parameter(s): none output parameter(s): none return value: none synchronization consideration: none

rpc_call

public int rpc_call(rpc_function rf)
method description: this method do the actural function passing from client to server uses the services of class(es): rpc_function, debug input parameter(s): rpc_function rf; output parameter(s): none return value: OK NULL_FUNCTION INVALID_FUNCTION OUTBOUND_STREAM_CREATE_FAILED SEND_FUNCTION_FAILED RECEIVE_ACK_ERROR REPLY_NOT_ACK TIME_OUT_WAITING_ACK synchronization consideration: synchronized

run

public void run()
method description: this method do the actural function receiving from server to client uses the services of class(es): rpc_function, debug input parameter(s): none; output parameter(s): none return value: none synchronization consideration: none
Overrides:
run in class java.lang.Thread