import java.io.*; import java.util.*; import java.lang.*; /** This class represents the routing information for a destination LP, * including PE id, LP id, application id, etc. * @author Yin Xiong * @version 2.0(10/2006) * @since 1.1 */ public class RoutingInfo implements Serializable{ /**The id of the PE this LP resides on*/ int PEid; /**The ip address of the PE*/ String PEip; /**The name of the machine where the PE is running*/ String machineName; /**The id of the LP*/ int LPid; /**The application id*/ String APPid; public RoutingInfo(int pid, int lid, String aid) { PEid=pid; LPid=lid; APPid=aid; } public RoutingInfo(int pid, String pip, String pm, int lid, String appid) { PEid=pid; PEip=pip; machineName=pm; LPid=lid; APPid=appid; } public String toString() { String s="rinfo: " + PEid + " " + PEip + " " + machineName + " " + LPid + " " + APPid; return s; }//end toString /**Gets the PE machine name*/ public String getMachineName() { return machineName; } /**Sets the PE machine name*/ void setMachineName(String pm) { machineName=pm; } /**Sets the PEid */ void setPEid(int pid) { PEid=pid; }//end setPEid /**Sets the LPid*/ void setLPid(int lid) { LPid=lid; }//end setLPid /**Sets the APPid*/ void setAPPid(String aid) { APPid=aid; }//end setAPPid /**Gets the PEid of the LP*/ public int getPEid() { return PEid; }//end getPEid /**Gets the LPid of the LP*/ public int getLPid() { return LPid; }//end getLPid /**Gets the APPid of the LP*/ public String getAPPid() { return APPid; }//end getAPPid /**Display the content of the RoutingInfo instance.*/ public void dump() { System.out.println("pid, lid ,appid: " + PEid + " " + LPid + " " + APPid); }//end dump }//end class RoutingInfo