ist.palcom.routing
Class DSDVTable

java.lang.Object
  extended by ist.palcom.routing.DSDVTable

public class DSDVTable
extends Object

DSDV-Table


Constructor Summary
DSDVTable()
          DSDV-Table representation
 
Method Summary
 void addPeer(DSDVPeer peer)
           
 void deletePeer(URN routingURN, Selector routingSelector)
          Delete a peer based on the URN
 DSDVPeer getPeer(URN routingURN)
          Get a peer based on the URN
 LinkedList getPeers()
           
 String marshall()
          Marshalling the DSDV-table.
 void reset()
           
static DSDVTable unmarshall(String input)
          Unmarshalling
 boolean updateStatus(boolean pong, URN routingURN)
          The metric must = 0 and next_hop must match
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, println, toString
 

Constructor Detail

DSDVTable

public DSDVTable()
DSDV-Table representation

Method Detail

addPeer

public void addPeer(DSDVPeer peer)

deletePeer

public void deletePeer(URN routingURN,
                       Selector routingSelector)
Delete a peer based on the URN

Parameters:
routingURN -

updateStatus

public boolean updateStatus(boolean pong,
                            URN routingURN)
The metric must = 0 and next_hop must match

Parameters:
pong - true if update after a pong message and false after ping message
next_hop - URL
Returns:
true if found peer

getPeer

public DSDVPeer getPeer(URN routingURN)
Get a peer based on the URN

Returns:

getPeers

public LinkedList getPeers()

reset

public void reset()

marshall

public String marshall()
Marshalling the DSDV-table.

Returns:
String

unmarshall

public static DSDVTable unmarshall(String input)
Unmarshalling

Parameters:
input - The marshalled String
Returns:
DSDVTable