jist.swans.route
Class RouteZrpBrp

java.lang.Object
  extended by jist.swans.route.RouteZrpBrp
All Implemented Interfaces:
Protocol, Timer, RouteInterface.Zrp.Brp

public class RouteZrpBrp
extends java.lang.Object
implements RouteInterface.Zrp.Brp, Timer

Zone Routing Protocol: Bordercast Resolution (sub)Protocol: Default implementation.

Since:
SWANS1.0

Nested Class Summary
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.
 
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
 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

logBRP

public static final org.apache.log4j.Logger logBRP
logger for BRP events.


COVERAGE_LIFETIME

public static final long COVERAGE_LIFETIME
query coverage expiration.

See Also:
Constant Field Values

COVERAGE_REFRESH

public static final long COVERAGE_REFRESH
query coverage refresh timer (check for expiration).

See Also:
Constant Field Values

JITTER

public static final long JITTER
brp delivery jitter.

See Also:
Constant Field Values
Constructor Detail

RouteZrpBrp

public RouteZrpBrp(RouteZrp zrp)
Create new "default" BRP (ZRP sub-protocol) handler.

Parameters:
zrp - object reference to zrp routing framework

RouteZrpBrp

public RouteZrpBrp(RouteZrp zrp,
                   java.lang.String config)
Create new "default" BRP (ZRP sub-protocol) handler.

Parameters:
zrp - object reference to zrp routing framework
config - configuration string
Method Detail

start

public void start()
Start running protocol.

Specified by:
start in interface Protocol

receive

public void receive(RouteInterface.Zrp.MessageBrp msg,
                    NetAddress from)
Process incoming BRP packet.

Specified by:
receive in interface RouteInterface.Zrp.Brp
Parameters:
msg - brp packet
from - source of incoming brp packet

send

public void send(RouteInterface.Zrp.MessageIerp msg)
Bordercast a query.

Specified by:
send in interface RouteInterface.Zrp.Brp
Parameters:
msg - query to bordercast

timeout

public void timeout()
Timer expiration processing.

Specified by:
timeout in interface Timer