edu.virginia.cs.mng.hypercast
Class ServerReceiver

java.lang.Object
  |
  +--edu.virginia.cs.mng.hypercast.ServerReceiver

class ServerReceiver
extends java.lang.Object
implements java.lang.Runnable

Reads the response from the server and inserts into the message queue, then dies.


Field Summary
private  boolean died
          True if myThread has returned from run().
private  boolean dying
          True if the function die() has been called.
private  byte[] messageBody
          The message to be sent.
private  java.lang.Thread myThread
          The receiving thread.
private  MessageBuffer Output
          The buffer for received messages.
private  UDP_HTTP_ServerAdapter Parent
          The adapter.
private  java.lang.String serverQueryPrefix
          The URL of the server that the message should be sent to.
private  boolean waiting
          True while myThread is waiting to receive.
private  java.lang.Object waitingGuard
          Guard used to protect waiting when it is changed.
 
Constructor Summary
(package private) ServerReceiver(UDP_HTTP_ServerAdapter p, MessageBuffer o, java.lang.String sqp, byte[] m)
           
 
Method Summary
(package private)  void die()
          Causes myThread to halt eventually.
(package private)  boolean isDead()
          Returns true if myThread will never call an I_AdapterCallBack method again.
 void run()
          Reads the response from the server and inserts into the message queue, then dies.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

Parent

private UDP_HTTP_ServerAdapter Parent
The adapter.

Output

private MessageBuffer Output
The buffer for received messages.

messageBody

private byte[] messageBody
The message to be sent.

serverQueryPrefix

private java.lang.String serverQueryPrefix
The URL of the server that the message should be sent to.

myThread

private java.lang.Thread myThread
The receiving thread.

dying

private boolean dying
True if the function die() has been called.

died

private boolean died
True if myThread has returned from run().

waiting

private boolean waiting
True while myThread is waiting to receive.

waitingGuard

private java.lang.Object waitingGuard
Guard used to protect waiting when it is changed.
Constructor Detail

ServerReceiver

ServerReceiver(UDP_HTTP_ServerAdapter p,
               MessageBuffer o,
               java.lang.String sqp,
               byte[] m)
Method Detail

run

public void run()
Reads the response from the server and inserts into the message queue, then dies.
Specified by:
run in interface java.lang.Runnable

die

void die()
Causes myThread to halt eventually.

isDead

boolean isDead()
Returns true if myThread will never call an I_AdapterCallBack method again.