driver
Class CBR.Server

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

public static class CBR.Server
extends java.lang.Object
implements CBR.ServerInterface

A server node in the simulation. This node simply listens for incoming packets and prints a message for each one that it receives.


Field Summary
private  NetAddress localAddr
          The IP address of this node.
private  int packetsReceived
          The number of packets this node has received.
private  CBR.ServerInterface self
          The proxy interface for this object.
private  TransInterface.TransUdpInterface udp
          The UDP interface used by this node.
 
Constructor Summary
CBR.Server(TransInterface.TransUdpInterface udp, NetAddress localAddr)
          Creates a new Server.
 
Method Summary
 CBR.ServerInterface getProxy()
          Returns the proxy interface for this object.
 void run()
          Starts the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

self

private CBR.ServerInterface self
The proxy interface for this object.


udp

private TransInterface.TransUdpInterface udp
The UDP interface used by this node.


localAddr

private NetAddress localAddr
The IP address of this node.


packetsReceived

private int packetsReceived
The number of packets this node has received.

Constructor Detail

CBR.Server

public CBR.Server(TransInterface.TransUdpInterface udp,
                  NetAddress localAddr)
Creates a new Server.

Parameters:
udp - the UDP interface used by this node
localAddr - the IP address of this node
Method Detail

getProxy

public CBR.ServerInterface getProxy()
Returns the proxy interface for this object.

Returns:
the proxy interface for this object.

run

public void run()
Starts the server.

Specified by:
run in interface CBR.ServerInterface