SSF.OS.OSPFv2
Class LSASlot

java.lang.Object
  |
  +--SSF.OS.OSPFv2.LSASlot
Direct Known Subclasses:
OwnLSASlot, RecLSASlot

public class LSASlot
extends java.lang.Object

This class is intended as a container for a single LSA. It holds this LSA, and two markers indicating the install time and the age of the LSA when received.


Field Summary
 float installTime
           
 LSA lsa
           
 OSPF myOSPF
           
 long receivingAge
           
 
Constructor Summary
LSASlot(LSA lsa, OSPF myOSPF)
          creates a new container for a single LSA.
 
Method Summary
 boolean ageLSA()
          determines the new age of the LSA stored in this structure and set the lsAge field to the new value.
 LSA getLSA()
          return a copy of the LSA hold in this slot.
 LSA getLSAHeader()
          Return a copy of the header of the LSA hold in this slot.
 void install(LSA adv)
          installs a new instance of an existing LSA in this slot.
 boolean lsaHasMaxAge()
          Check whether the LSA, stored in this slot, has lsAge equal to MAX_AGE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lsa

public LSA lsa

installTime

public float installTime

receivingAge

public long receivingAge

myOSPF

public OSPF myOSPF
Constructor Detail

LSASlot

public LSASlot(LSA lsa,
               OSPF myOSPF)
creates a new container for a single LSA.

Parameters:
lsa - The first instance of the LSA installed in this slot.
myOSPF - A link to the OSPF session this slot belongs to.
Method Detail

install

public void install(LSA adv)
             throws ProtocolException
installs a new instance of an existing LSA in this slot. Overridden in derived classes.

ProtocolException

ageLSA

public boolean ageLSA()
determines the new age of the LSA stored in this structure and set the lsAge field to the new value. Return true if MAX_AGE is reached, else false.


lsaHasMaxAge

public boolean lsaHasMaxAge()
Check whether the LSA, stored in this slot, has lsAge equal to MAX_AGE.

Returns:
boolean, holding true if stored LSA has age of MAX_AGE else false.

getLSAHeader

public LSA getLSAHeader()
Return a copy of the header of the LSA hold in this slot.


getLSA

public LSA getLSA()
return a copy of the LSA hold in this slot.