simnet
Class RIPEntry

java.lang.Object
  extended bysimnet.RIPEntry

public class RIPEntry
extends java.lang.Object

An object used to store a single entry for RIP Routing.


Field Summary
(package private)  int destination
           
(package private)  int distance
           
static int EXPIRY
          Time that must elapse (in ms) before a route is considered expired.
(package private)  int fixed_bits
           
static int GARBAGE
          Time that must elapse (in ms) before an expired route forgotten.
(package private)  int nextHop
           
(package private)  long time_stamp
           
 
Constructor Summary
RIPEntry(int dest, int nh, int dist, int fb)
          Create a new RIP entry with the specified values.
 
Method Summary
 void expire()
          Exipire this route.
 long getAge()
          Returns how long it has been (in ms) since this route was confirmed.
 boolean isExpired()
          Returns if this route has expired.
 boolean isStale()
          Returns if this route has expired and should be garbage collected.
 void resetTimeStamp()
          Called when this route is reconfirmed (updates the time stamp to now).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPIRY

public static final int EXPIRY
Time that must elapse (in ms) before a route is considered expired.

See Also:
Constant Field Values

GARBAGE

public static final int GARBAGE
Time that must elapse (in ms) before an expired route forgotten.

See Also:
Constant Field Values

destination

int destination

nextHop

int nextHop

distance

int distance

fixed_bits

int fixed_bits

time_stamp

long time_stamp
Constructor Detail

RIPEntry

public RIPEntry(int dest,
                int nh,
                int dist,
                int fb)
Create a new RIP entry with the specified values.

Method Detail

getAge

public long getAge()
Returns how long it has been (in ms) since this route was confirmed.


resetTimeStamp

public void resetTimeStamp()
Called when this route is reconfirmed (updates the time stamp to now).


expire

public void expire()
Exipire this route.


isExpired

public boolean isExpired()
Returns if this route has expired.


isStale

public boolean isStale()
Returns if this route has expired and should be garbage collected.