import java.io.*; import java.util.*; import java.lang.*; /** This class represents the local name server that routes the messages among PEs. Each * PE has a related local name server. * @author Yin Xiong * @author Glenn Matthews * @version 1.2 (06/2005) */ public class LocalNameServer{ /**The ID of the PE this local name server serves.*/ int PEid; /**The address of the global name server.*/ String gns; /**A vector that stores the LP address information */ Vector routingTable; /**Construct a new LocalNameServer object. *@param pid int the system-assigned id of this PE */ public LocalNameServer(int pid) { PEid=pid; routingTable=new Vector(); }//end constructor /**Adds a row of routing inforamtion into the lookup table. *@param rinfo an RoutingInfo instance representing a row in the table. *@return the size of the lookup table. */ public int addRoutingRow(RoutingInfo rinfo) { routingTable.add(rinfo); return routingTable.size(); }//end addRoutingRow /**Displays the contents of the routing table.*/ public void dump() { for(int i=0;i