|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjist.swans.route.RouteZrpBrp
public class RouteZrpBrp
Zone Routing Protocol: Bordercast Resolution (sub)Protocol: Default implementation.
Nested Class Summary | |
---|---|
private static class |
RouteZrpBrp.MessageBrp
BRP (Bordercast Resolution Protocol) packet. |
static class |
RouteZrpBrp.QueryCoverageEntry
BRP query entry. |
static class |
RouteZrpBrp.QueryKey
BRP query key. |
Field Summary | |
---|---|
static long |
COVERAGE_LIFETIME
query coverage expiration. |
static long |
COVERAGE_REFRESH
query coverage refresh timer (check for expiration). |
static long |
JITTER
brp delivery jitter. |
static org.apache.log4j.Logger |
logBRP
logger for BRP events. |
private java.util.HashMap |
queryCoverage
bordercast supression table: QueryKey - QueryCoverageEntry. |
private RouteZrp |
zrp
reference to zrp routing framework. |
Constructor Summary | |
---|---|
RouteZrpBrp(RouteZrp zrp)
Create new "default" BRP (ZRP sub-protocol) handler. |
|
RouteZrpBrp(RouteZrp zrp,
java.lang.String config)
Create new "default" BRP (ZRP sub-protocol) handler. |
Method Summary | |
---|---|
private NetAddress[] |
bordercastNeighbours(java.util.Vector from)
Compute first hop in bordercast tree (without minimization). |
private NetAddress[] |
bordercastNeighbours2(java.util.Vector from)
Compute first hop in bordercast tree using greedy neighbour minimisation heuristic. |
private java.util.Map |
computeClosestNeighbours()
For each node in the zone, compute the set of closest neighbours. |
private RouteZrpBrp.QueryCoverageEntry |
getQueryCoverageEntry(NetAddress src,
short seq,
boolean target)
Return query coverage entry for given source and identifier. |
private java.util.Collection |
getUncoveredPeripheral(java.util.Vector from)
Return all the uncovered peripheral nodes. |
void |
receive(RouteInterface.Zrp.MessageBrp msg,
NetAddress from)
Process incoming BRP packet. |
void |
send(RouteInterface.Zrp.MessageIerp msg)
Bordercast a query. |
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 logBRP
public static final long COVERAGE_LIFETIME
public static final long COVERAGE_REFRESH
public static final long JITTER
private RouteZrp zrp
private java.util.HashMap queryCoverage
Constructor Detail |
---|
public RouteZrpBrp(RouteZrp zrp)
zrp
- object reference to zrp routing frameworkpublic RouteZrpBrp(RouteZrp zrp, java.lang.String config)
zrp
- object reference to zrp routing frameworkconfig
- configuration stringMethod Detail |
---|
private java.util.Collection getUncoveredPeripheral(java.util.Vector from)
from
- source of bordercast
private NetAddress[] bordercastNeighbours(java.util.Vector from)
from
- sources that have already processed this query
private NetAddress[] bordercastNeighbours2(java.util.Vector from)
from
- sources that have already processed this query
private java.util.Map computeClosestNeighbours()
private RouteZrpBrp.QueryCoverageEntry getQueryCoverageEntry(NetAddress src, short seq, boolean target)
src
- query source addressseq
- query source identifiertarget
- whether node was targetted in query broadcast
public void start()
start
in interface Protocol
public void receive(RouteInterface.Zrp.MessageBrp msg, NetAddress from)
receive
in interface RouteInterface.Zrp.Brp
msg
- brp packetfrom
- source of incoming brp packetpublic void send(RouteInterface.Zrp.MessageIerp msg)
send
in interface RouteInterface.Zrp.Brp
msg
- query to bordercastpublic void timeout()
timeout
in interface Timer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |