|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectInternet
public class Internet
The Internet class provides delivery of Packet objects between TCPEntity objects. This abstraction represents the view of the internet from just above the multiplexer/demultipler in the Transport layer.
All methods in this class are static. Messages should be sent to the Internet class object as shown in method comments.
Constructor Summary | |
---|---|
Internet()
|
Method Summary | |
---|---|
static double |
getReliability()
Internet.getReliability() returns the probability that a Packet gets delivered in the Internet. |
static int |
getRoundTripTime()
Internet.getRoundTripTime() returns the average round-trip time for the Internet. |
static void |
printConfiguration()
Internet.printConfiguration() prints the configuration parameters for the Internet. |
static void |
send(Packet pkt)
Internet.send(pkt) attempts delivery of pkt to its destination. |
static void |
setReliability(double rel)
Internet.setReliability(rel) sets the probability that a Packet gets delivered in the Internet to rel. |
static void |
setRoundTripTimes(int min,
int max)
Internet.setRoundTripTimes(min, max) sets the minimum and maximum round-trip time for the Internet to min and max. |
static void |
setSeed(long sd)
Internet.setSeed(sd) sets the seed for the random number generator used in the Internet to sd. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Internet()
Method Detail |
---|
public static void printConfiguration()
public static void setSeed(long sd)
For a given seed, the sequence of delivery successes and delivery times will always be the same. If this method is not invoked, the current time will be used to set the seed, resulting in a different sequence of delivery successes and delivery times from one run to another.
public static int getRoundTripTime()
public static void setRoundTripTimes(int min, int max)
public static double getReliability()
public static void setReliability(double rel)
public static void send(Packet pkt)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |