net.vattp.data
Class DataCommThunk

java.lang.Object
  |
  +--net.vattp.data.DataCommThunk
All Implemented Interfaces:
Runnable

class DataCommThunk
extends Object
implements Runnable


Field Summary
private static int ACCEPT_RECEIVER
           
private static int INCOMING_SOCKET
           
private  String myAddress
           
private  VatTPMgr myConnMgr
           
private  StreamMessage myContinuation
           
private  DataPath myDataPath
           
private  Throwable myException
           
private  NetAddr myLocalNetAddr
           
private  byte[] myMessage
           
private  RecvThread myRecvThread
           
private  NetAddr myRemoteNetAddr
           
private  Socket mySocket
           
private  int myWrittenCount
           
private  int myWrittenLength
           
private static int NEW_INCOMING_MSG
           
private static int NOTICE_PROBLEM
           
private static int NOTICE_PROBLEM_CM
           
private static int SEND_FINISHED
           
private static int SEND_PROGRESS
           
private static int SHUT_DOWN_FINISHED
           
private  int type
           
 
Constructor Summary
(package private) DataCommThunk(DataPath conn)
          Construct a DataCommThunk to call recordSendProgress() in a DataPath object.
(package private) DataCommThunk(DataPath conn, byte[] message)
          Construct a DataCommThunk to call newIncomingMsg() in a DataPath object.
(package private) DataCommThunk(DataPath conn, byte[] sendIV, Exception reason)
          Construct a DataCommThunk to call shutDownFinished() in a DataPath object.
(package private) DataCommThunk(DataPath conn, int count, int length, StreamMessage continuation)
          Construct a DataCommThunk to call sendFinished() in a DataPath object.
(package private) DataCommThunk(DataPath conn, RecvThread recv, NetAddr remoteNetAddr, NetAddr localNetAddr)
          Construct a DataCommThunk to call newInboundSocket in a VatTPMgr object.
(package private) DataCommThunk(DataPath conn, Throwable e)
          Construct a DataCommThunk to call noticeProblem() in a DataPath object.
(package private) DataCommThunk(VatTPMgr connMgr, Socket socket)
          Construct a DataCommThunk to call newInboundSocket in a VatTPMgr object.
(package private) DataCommThunk(VatTPMgr connMgr, Throwable e)
          Construct a DataCommThunk to call noticeProblem() in a VatTPMgr object.
 
Method Summary
 void run()
          Actually do the invocation this Thunk was created to perform.
 String toString()
          Suppressed: Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOTICE_PROBLEM

private static final int NOTICE_PROBLEM

SHUT_DOWN_FINISHED

private static final int SHUT_DOWN_FINISHED

SEND_FINISHED

private static final int SEND_FINISHED

NEW_INCOMING_MSG

private static final int NEW_INCOMING_MSG

ACCEPT_RECEIVER

private static final int ACCEPT_RECEIVER

NOTICE_PROBLEM_CM

private static final int NOTICE_PROBLEM_CM

INCOMING_SOCKET

private static final int INCOMING_SOCKET

SEND_PROGRESS

private static final int SEND_PROGRESS

type

private int type

myDataPath

private DataPath myDataPath

myConnMgr

private VatTPMgr myConnMgr

myException

private Throwable myException

myWrittenLength

private int myWrittenLength

myWrittenCount

private int myWrittenCount

myContinuation

private StreamMessage myContinuation

myMessage

private byte[] myMessage

myRecvThread

private RecvThread myRecvThread

mySocket

private Socket mySocket

myRemoteNetAddr

private NetAddr myRemoteNetAddr

myLocalNetAddr

private NetAddr myLocalNetAddr

myAddress

private String myAddress
Constructor Detail

DataCommThunk

DataCommThunk(VatTPMgr connMgr,
              Throwable e)
Construct a DataCommThunk to call noticeProblem() in a VatTPMgr object.

Parameters:
connMgr - the VatTPMgr object to invoke.
e - the Exception object describing the problem.

DataCommThunk

DataCommThunk(VatTPMgr connMgr,
              Socket socket)
Construct a DataCommThunk to call newInboundSocket in a VatTPMgr object.

Parameters:
connMgr - the DataPath object to invoke.
socket - The byte array which is the message.

DataCommThunk

DataCommThunk(DataPath conn)
Construct a DataCommThunk to call recordSendProgress() in a DataPath object.

Parameters:
conn - the DataPath object to invoke.

DataCommThunk

DataCommThunk(DataPath conn,
              byte[] message)
Construct a DataCommThunk to call newIncomingMsg() in a DataPath object.

Parameters:
conn - the DataPath object to invoke.
message - The byte array which is the message.

DataCommThunk

DataCommThunk(DataPath conn,
              byte[] sendIV,
              Exception reason)
Construct a DataCommThunk to call shutDownFinished() in a DataPath object.

Parameters:
conn - the DataPath object to invoke shutdownFinished().
sendIV - is the next IV to use after the connection is resumed.
reason - is a dummy to make this constructor different from the one for new incoming data.

DataCommThunk

DataCommThunk(DataPath conn,
              int count,
              int length,
              StreamMessage continuation)
Construct a DataCommThunk to call sendFinished() in a DataPath object.

Parameters:
conn - the DataPath object to invoke.
continuation - is the streaming continuation or null.

DataCommThunk

DataCommThunk(DataPath conn,
              Throwable e)
Construct a DataCommThunk to call noticeProblem() in a DataPath object.

Parameters:
conn - the DataPath object to invoke.
e - the Exception object describing the problem.

DataCommThunk

DataCommThunk(DataPath conn,
              RecvThread recv,
              NetAddr remoteNetAddr,
              NetAddr localNetAddr)
Construct a DataCommThunk to call newInboundSocket in a VatTPMgr object.

Parameters:
conn - the DataPath object to invoke.
Method Detail

run

public void run()
Actually do the invocation this Thunk was created to perform. Normally called by Vat's now method after it has acquired the Vat lock.

Specified by:
run in interface Runnable
See Also:
java.lang.Thread#run()

toString

public String toString()
Description copied from class: Object
Suppressed: Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a string representation of the object.


comments?