com.sun.multicast.reliable.transport.tram
Interface TRAMSimulator


public interface TRAMSimulator

The TRAMSimulator interface enables use of simulators to test the TRAM protocol.


Method Summary
 void headChange(int port, int headPort)
          informs the simulator of a node's head change
 void levelChange(int port, int level)
          informs the simulator of a node's rxLevel change
 void memberCountChange(int port, int memberCount)
          informs the simulator of a node's member count change
 void simulateMulticastData(java.net.DatagramPacket dp, int ttl)
          passes the multicast data packet to the simulator
 void simulateMulticastPacket(java.net.DatagramPacket dp, int type, int ttl)
          passes the multicast packet to the simulator
 void simulateUnicastPacket(java.net.DatagramPacket dp)
          passes the unicast packet to the simulator
 void stateChange(int port, byte hState)
          informs the simulator of a node's state change
 

Method Detail

headChange

public void headChange(int port,
                       int headPort)
informs the simulator of a node's head change
Parameters:
port - the port associated with this node
headPort - the port of the node's new head

levelChange

public void levelChange(int port,
                        int level)
informs the simulator of a node's rxLevel change
Parameters:
port - the port associated with this node
level - the nex level of the node

memberCountChange

public void memberCountChange(int port,
                              int memberCount)
informs the simulator of a node's member count change
Parameters:
port - the port associated with this node
count - the member count of the node

simulateMulticastData

public void simulateMulticastData(java.net.DatagramPacket dp,
                                  int ttl)
passes the multicast data packet to the simulator
Parameters:
packet - the multicast data packet
ttl - the ttl of the packet

simulateMulticastPacket

public void simulateMulticastPacket(java.net.DatagramPacket dp,
                                    int type,
                                    int ttl)
passes the multicast packet to the simulator
Parameters:
packet - the multicast datagram packet
type - the TRAM subtype of the packet
ttl - the ttl of the packet

simulateUnicastPacket

public void simulateUnicastPacket(java.net.DatagramPacket dp)
passes the unicast packet to the simulator
Parameters:
packet - the unicast datagram packet

stateChange

public void stateChange(int port,
                        byte hState)
informs the simulator of a node's state change
Parameters:
port - the port associated with this node
state - the new state of this node


JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.