GridSim 5.0 beta

gridsim.net
Class RIPAdPack

Object
  extended by RIPAdPack

public class RIPAdPack
extends Object

This class is used to send link state advertisements to other routers. Only hosts are advertised, not routers.

Since:
GridSim Toolkit 3.1
Author:
Gokul Poduval & Chen-Khong Tham, National University of Singapore
Invariant:
$none

Constructor Summary
RIPAdPack(String sender, Collection c)
          Allocates a new object
 
Method Summary
 int getHopCount()
          Gets the number of hops
 Collection getHosts()
          Gets a list of hosts
 String getSender()
          Gets the sender's name
 void incrementHopCount()
          Increments the hop counter by one
 void setHopCount(int hopcount)
          Sets the hopcount
 void setSender(String sender)
          Set the sender's name
 String toString()
          Represents the information of this class into String
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RIPAdPack

public RIPAdPack(String sender,
                 Collection c)
Allocates a new object

Parameters:
sender - the sender's name
c - a Collection object
Pre Condition:
sender != null, c != null
Post Condition:
$none
Method Detail

getSender

public String getSender()
Gets the sender's name

Returns:
the sender's name
Pre Condition:
$none
Post Condition:
$none

setSender

public void setSender(String sender)
Set the sender's name

Parameters:
sender - the sender's name
Pre Condition:
sender != null
Post Condition:
$none

getHosts

public Collection getHosts()
Gets a list of hosts

Returns:
a Collection of host
Pre Condition:
$none
Post Condition:
$none

getHopCount

public int getHopCount()
Gets the number of hops

Returns:
the number of hops
Pre Condition:
$none
Post Condition:
$none

incrementHopCount

public void incrementHopCount()
Increments the hop counter by one

Pre Condition:
$none
Post Condition:
$none

setHopCount

public void setHopCount(int hopcount)
Sets the hopcount

Pre Condition:
$none
Post Condition:
$none

toString

public String toString()
Represents the information of this class into String

Overrides:
toString in class Object
Returns:
information about this class
Pre Condition:
$none
Post Condition:
$none

GridSim 5.0 beta

The University of Melbourne, Australia, 2009