driver
Class CBR.Client

java.lang.Object
  extended by driver.CBR.Client
All Implemented Interfaces:
CBR.ClientInterface, JistAPI.Proxiable, JistAPI.Timeless
Enclosing class:
CBR

public static class CBR.Client
extends java.lang.Object
implements CBR.ClientInterface

A client node in the simulation. Each client node sends numTransmissions packets to its corresponding server at a rate of one per second, then terminates.


Constructor Summary
CBR.Client(TransInterface.TransUdpInterface udp, int transmissions, NetAddress localAddr, NetAddress serverAddr)
          Creates a new Client.
 
Method Summary
 CBR.ClientInterface getProxy()
          Returns this object's proxy interface.
 void run()
          Starts the client.
 void sendMessage(int i)
          Sends message number i to this client's corresponding server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CBR.Client

public CBR.Client(TransInterface.TransUdpInterface udp,
                  int transmissions,
                  NetAddress localAddr,
                  NetAddress serverAddr)
Creates a new Client.

Parameters:
udp - the UDP interface for this node to use
transmissions - number of outgoing tranmissions
localAddr - this node's IP address
serverAddr - the IP address of the server to send messages to
Method Detail

getProxy

public CBR.ClientInterface getProxy()
Returns this object's proxy interface.

Returns:
this object's proxy interface

run

public void run()
Starts the client.

Specified by:
run in interface CBR.ClientInterface

sendMessage

public void sendMessage(int i)
Sends message number i to this client's corresponding server.

Specified by:
sendMessage in interface CBR.ClientInterface
Parameters:
i - the number of the message to send