de.tubs.macs.control.net
Class TestSessionNet

java.lang.Object
  |
  +--de.tubs.macs.control.net.TestSessionNet

public class TestSessionNet
extends java.lang.Object
implements NetReceiver

This class provides the access to the network with added control functionality for a session.


Field Summary
static java.lang.String DEBUG_KEY
           
 
Constructor Summary
TestSessionNet(Session session, ObjectID segmentID)
          TestSessionNet
 
Method Summary
 void applicationAddressHack()
          a hack to fix addresses of applications in the session to the same basic parameters.
 int checkStatus()
          Check status of SessionNet (goes together with SessionNet(status) constructor).
 int getTTL()
          return the ttl of Net used.
 java.lang.String getType()
          return the type of Net used.
 boolean join(User user)
           
 void receiveException(NetException exception)
          Implement this one to deal with exceptions.
 void receiveObject(java.lang.Object object, Net net)
          Implement this one to receive objects.
 MACSResponse sendRequestAndWaitForResponse(MACSRequest req, long timeout)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_KEY

public static final java.lang.String DEBUG_KEY
Constructor Detail

TestSessionNet

public TestSessionNet(Session session,
                      ObjectID segmentID)
               throws NetException
TestSessionNet
Method Detail

join

public boolean join(User user)
             throws NetException

checkStatus

public int checkStatus()
Check status of SessionNet (goes together with SessionNet(status) constructor).

receiveObject

public void receiveObject(java.lang.Object object,
                          Net net)
Description copied from interface: NetReceiver
Implement this one to receive objects.
Specified by:
receiveObject in interface NetReceiver
Tags copied from interface: NetReceiver
Parameters:
object - received
net - which did receive this object (allows one NetReceiver to be used for more than one Net)

receiveException

public void receiveException(NetException exception)
Description copied from interface: NetReceiver
Implement this one to deal with exceptions.
Specified by:
receiveException in interface NetReceiver
Tags copied from interface: NetReceiver
Parameters:
exception - received from Net

getType

public java.lang.String getType()
return the type of Net used.

getTTL

public int getTTL()
return the ttl of Net used.

applicationAddressHack

public void applicationAddressHack()
a hack to fix addresses of applications in the session to the same basic parameters.

sendRequestAndWaitForResponse

public MACSResponse sendRequestAndWaitForResponse(MACSRequest req,
                                                  long timeout)