|
||||||||||
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 | |
---|---|
static class |
RouteZrpIarp.RouteEntry
IARP route entry. |
Field Summary | |
---|---|
static byte |
COMPRESS_INFINITE
compression constant: inifinite. |
static byte |
COMPRESS_NONE
compression constant: no aggregation. |
static long |
JITTER
iarp transmission jitter. |
static long |
LINK_LIFETIME
link state expiration time. |
static org.apache.log4j.Logger |
logIARP
logger for IARP events. |
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 | |
---|---|
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. |
void |
timeout()
Timer expiration processing. |
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
Constructor Detail |
---|
public RouteZrpIarp(RouteZrp zrp)
zrp
- object reference to zrp routing frameworkpublic RouteZrpIarp(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 start()
start
in interface Protocol
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 timeout()
timeout
in interface Timer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |