jist.swans.route
Class RouteZrpIerp

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

public class RouteZrpIerp
extends java.lang.Object
implements RouteInterface.Zrp.Ierp, Timer

Zone Routing Protocol: IntErzone Routing (sub)Protocol: Default implementation.

Since:
SWANS1.0

Nested Class Summary
static class RouteZrpIerp.MessageQueue
          Queue of message waiting for route replies.
 
Field Summary
static org.apache.log4j.Logger logIERP
          logger for IERP events.
static long QUEUE_LIFETIME
          packet queue expiration.
static long QUEUE_REFRESH
          packet queue refresh timer (check for expiration).
 
Constructor Summary
RouteZrpIerp(RouteZrp zrp)
          Create new "default" IERP (ZRP sub-protocol) handler.
RouteZrpIerp(RouteZrp zrp, java.lang.String config)
          Create new "default" IERP (ZRP sub-protocol) handler.
 
Method Summary
 void receive(RouteInterface.Zrp.MessageIerp msg)
          Process incoming IERP packet.
 void send(NetMessage.Ip ip)
          Route and send given network message.
 void start()
          Start running protocol.
 void timeout()
          Timer expiration processing.
 void zoneChanged()
          Process IARP signal to IERP that zone information has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logIERP

public static final org.apache.log4j.Logger logIERP
logger for IERP events.


QUEUE_LIFETIME

public static final long QUEUE_LIFETIME
packet queue expiration.

See Also:
Constant Field Values

QUEUE_REFRESH

public static final long QUEUE_REFRESH
packet queue refresh timer (check for expiration).

See Also:
Constant Field Values
Constructor Detail

RouteZrpIerp

public RouteZrpIerp(RouteZrp zrp)
Create new "default" IERP (ZRP sub-protocol) handler.

Parameters:
zrp - object reference to zrp routing framework

RouteZrpIerp

public RouteZrpIerp(RouteZrp zrp,
                    java.lang.String config)
Create new "default" IERP (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

zoneChanged

public void zoneChanged()
Process IARP signal to IERP that zone information has changed.

Specified by:
zoneChanged in interface RouteInterface.Zrp.Ierp

receive

public void receive(RouteInterface.Zrp.MessageIerp msg)
Process incoming IERP packet.

Specified by:
receive in interface RouteInterface.Zrp.Ierp
Parameters:
msg - ierp packet

send

public void send(NetMessage.Ip ip)
Route and send given network message.

Specified by:
send in interface RouteInterface.Zrp.Ierp
Parameters:
ip - network message to route and send

timeout

public void timeout()
Timer expiration processing.

Specified by:
timeout in interface Timer