|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.swans.route.RouteZrpZdp
public class RouteZrpZdp
Zone Routing Protocol: Zone Discovery (sub)Protocol - an alternate IARP.
Nested Class Summary | |
---|---|
static class |
RouteZrpZdp.MessageZdp
ZDP (Zone Discovery Protocol) packet. |
Field Summary | |
---|---|
static byte |
COMPRESS_INFINITE
compression constant: inifinite. |
static byte |
COMPRESS_NODE
compression constant: aggregate across single node. |
static byte |
COMPRESS_NONE
compression constant: no aggregation. |
static byte |
COMPRESS_ZONE
compression constant: aggregate across zone. |
static byte |
COMPRESS_ZONE_REVERSE
compression constant: aggregate across zone. |
long |
DELAY
zdp delay time. |
long |
FLUSH
zdp flush time. |
long |
JITTER
zdp update jitter. |
static org.apache.log4j.Logger |
logZDP
logger for ZDP events. |
Constructor Summary | |
---|---|
RouteZrpZdp(RouteZrp zrp)
Create a new "default" IARP (ZRP sub-protocol) handler. |
|
RouteZrpZdp(RouteZrp zrp,
java.lang.String config)
Create a new "default" IARP (ZRP sub-protocol) handler. |
Method Summary | |
---|---|
java.util.Set |
computeCoverage(NetAddress src,
int depth)
Find the set of nodes within a given distance of source. |
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. |
boolean |
hasRoute(NetAddress dst)
Return whether node is within zone (if IARP has route to it). |
void |
linkinfo(Link link,
boolean drop)
Notify IARP of link state change. |
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. |
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 logZDP
public final long JITTER
public final long DELAY
public final long FLUSH
public static final byte COMPRESS_NONE
public static final byte COMPRESS_NODE
public static final byte COMPRESS_ZONE
public static final byte COMPRESS_ZONE_REVERSE
public static final byte COMPRESS_INFINITE
Constructor Detail |
---|
public RouteZrpZdp(RouteZrp zrp)
zrp
- object reference to zrp routing frameworkpublic RouteZrpZdp(RouteZrp zrp, java.lang.String config)
zrp
- object reference to zrp routing frameworkconfig
- configuration stringMethod Detail |
---|
public void setCompress(byte compress)
compress
- packet compression modepublic void showLinks()
showLinks
in interface RouteInterface.Zrp.Iarp
public void showRoutes()
showRoutes
in interface RouteInterface.Zrp.Iarp
public void receive(RouteInterface.Zrp.MessageIarp msg, NetAddress from)
receive
in interface RouteInterface.Zrp.Iarp
msg
- iarp packetfrom
- source of iarp packetpublic void linkinfo(Link link, boolean drop)
linkinfo
in interface RouteInterface.Zrp.Iarp
link
- link that has changeddrop
- whether link has failed (or been created)public int getNumLinks()
getNumLinks
in interface RouteInterface.Zrp.Iarp
public java.util.Enumeration getLinks(NetAddress src)
getLinks
in interface RouteInterface.Zrp.Iarp
src
- link source address
public boolean hasRoute(NetAddress dst)
hasRoute
in interface RouteInterface.Zrp.Iarp
dst
- destination node
public NetAddress[] getRoute(NetAddress dst)
getRoute
in interface RouteInterface.Zrp.Iarp
dst
- destination node
public int getNumRoutes()
getNumRoutes
in interface RouteInterface.Zrp.Iarp
public java.util.Collection getPeripheral()
getPeripheral
in interface RouteInterface.Zrp.Iarp
public java.util.Set computeCoverage(NetAddress src, int depth)
computeCoverage
in interface RouteInterface.Zrp.Iarp
src
- source nodedepth
- radius
public void start()
start
in interface Protocol
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |