| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.route.RouteZrpIarp
public class RouteZrpIarp
Zone Routing Protocol: IntrAzone Routing (sub)Protocol: Default implementation.
| Nested Class Summary | |
|---|---|
| private static class | RouteZrpIarp.LinkStateEntryIARP Link state entry. | 
| private static class | RouteZrpIarp.MessageIarpIARP (IntrAzone Routing Protocol) packet. | 
| static class | RouteZrpIarp.RouteEntryIARP route entry. | 
| Field Summary | |
|---|---|
| private  byte | compresscompression mode. | 
| static byte | COMPRESS_INFINITEcompression constant: inifinite. | 
| static byte | COMPRESS_NONEcompression constant: no aggregation. | 
| private  java.lang.ref.SoftReference | computedRoutesintra-zone routes: NetAddress - RouteEntry. | 
| static long | JITTERiarp transmission jitter. | 
| static long | LINK_LIFETIMElink state expiration time. | 
| private  java.util.HashMap | linkStatezone link state: NetAddress - LinkStateEntry. | 
| private  short | linkStateSeqiarp identifier. | 
| static org.apache.log4j.Logger | logIARPlogger for IARP events. | 
| private  RouteZrp | zrpreference to zrp routing framework. | 
| Constructor Summary | |
|---|---|
| RouteZrpIarp(RouteZrp zrp)Create a new "default" IARP (ZRP sub-protocol) handler. | |
| RouteZrpIarp(RouteZrp zrp,
             java.lang.String config)Create a new "default" IARP (ZRP sub-protocol) handler. | |
| Method Summary | |
|---|---|
| private  void | clearRoutes()Flush the computed routes. | 
|  java.util.Set | computeCoverage(NetAddress src,
                int depth)Find the set of nodes within a given distance of source. | 
| private  java.util.Map | computeRoutes()(Re-)Compute a minimum hop route for each node in zone using current link state information. | 
| private  boolean | flushLinkState()Flush out IARP link state that has expired. | 
|  java.util.Enumeration | getLinks(NetAddress src)Return iterator of links from given source address. | 
|  int | getNumLinks()Return number of intra-zone links. | 
|  int | getNumRoutes()Return number of intra-zone routes. | 
|  java.util.Collection | getPeripheral()Return all peripheral nodes. | 
|  NetAddress[] | getRoute(NetAddress dst)Return intra-zone route. | 
| private  java.util.Map | getRoutes()Return the intra-zone routes, computing them if necessary. | 
|  boolean | hasRoute(NetAddress dst)Return whether node is within zone (if IARP has route to it). | 
| private  short | incLinkStateSeq()Return new link state sequence number. | 
|  void | linkinfo(Link link,
         boolean drop)Notify IARP of link state change. | 
| private  void | neighboursChanged()Neighbours have changed. | 
|  void | receive(RouteInterface.Zrp.MessageIarp msg,
        NetAddress from)Process incoming IARP packet. | 
|  void | setCompress(byte compress)Set packet compression mode. | 
|  void | showLinks()Display link state. | 
|  void | showRoutes()Display in-zone routing table. | 
|  void | start()Start running protocol. | 
|  void | timeout()Timer expiration processing. | 
| private  boolean | updateLinkState(NetAddress src,
                short seq,
                NetAddress[] dst)Update link state with new information. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final org.apache.log4j.Logger logIARP
public static final long LINK_LIFETIME
public static final long JITTER
public static final byte COMPRESS_NONE
public static final byte COMPRESS_INFINITE
private RouteZrp zrp
private java.util.HashMap linkState
private short linkStateSeq
private java.lang.ref.SoftReference computedRoutes
private byte compress
| Constructor Detail | 
|---|
public RouteZrpIarp(RouteZrp zrp)
zrp - object reference to zrp routing framework
public RouteZrpIarp(RouteZrp zrp,
                    java.lang.String config)
zrp - object reference to zrp routing frameworkconfig - configuration string| Method Detail | 
|---|
public void setCompress(byte compress)
compress - packet compression modeprivate short incLinkStateSeq()
private void neighboursChanged()
private boolean updateLinkState(NetAddress src,
                                short seq,
                                NetAddress[] dst)
src - link state information sourceseq - link state source sequence numberdst - list of links from source
private boolean flushLinkState()
private java.util.Map getRoutes()
private void clearRoutes()
private java.util.Map computeRoutes()
public void showLinks()
showLinks in interface RouteInterface.Zrp.Iarppublic void showRoutes()
showRoutes in interface RouteInterface.Zrp.Iarppublic void start()
start in interface Protocol
public void receive(RouteInterface.Zrp.MessageIarp msg,
                    NetAddress from)
receive in interface RouteInterface.Zrp.Iarpmsg - iarp packetfrom - source of iarp packet
public void linkinfo(Link link,
                     boolean drop)
linkinfo in interface RouteInterface.Zrp.Iarplink - link that has changeddrop - whether link has failed (or been created)public int getNumLinks()
getNumLinks in interface RouteInterface.Zrp.Iarppublic java.util.Enumeration getLinks(NetAddress src)
getLinks in interface RouteInterface.Zrp.Iarpsrc - link source address
public boolean hasRoute(NetAddress dst)
hasRoute in interface RouteInterface.Zrp.Iarpdst - destination node
public NetAddress[] getRoute(NetAddress dst)
getRoute in interface RouteInterface.Zrp.Iarpdst - destination node
public int getNumRoutes()
getNumRoutes in interface RouteInterface.Zrp.Iarppublic java.util.Collection getPeripheral()
getPeripheral in interface RouteInterface.Zrp.Iarp
public java.util.Set computeCoverage(NetAddress src,
                                     int depth)
computeCoverage in interface RouteInterface.Zrp.Iarpsrc - source nodedepth - radius
public void timeout()
timeout in interface Timer| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||