org.kth.dks.planetlab
Class PlanetLabDKS

java.lang.Object
  extended by org.kth.dks.planetlab.PlanetLabDKS
All Implemented Interfaces:
DKSDHTCallback

public class PlanetLabDKS
extends java.lang.Object
implements DKSDHTCallback


Constructor Summary
PlanetLabDKS()
           
 
Method Summary
 void dhtBroadcastCallback(DKSObject value)
          Receive a broadcast message
 DKSMessage dhtRouteCallback(long identifier, DKSMessage msg)
          The callback is called at the responsible node when a route() message reaches its destination and the message is not handled at a lower abstraction layer.
 void dhtRouteCallbackAsync(long identifier, DKSMessage msg)
          The callback is called at the responsible node when a route() message reaches its destination and the message is not handled at a lower abstraction layer.
 void keepAliveMsgHandler(DKSRef source, KeepAliveMsg msg)
           
 void liveNodesMsgHandler(DKSRef source, LiveNodesMsg msg)
           
static void main(java.lang.String[] args)
           
 void pingMsgHandler(DKSRef source, PingMsg msg)
           
 void pongMsgHandler(DKSRef source, PongMsg msg)
           
 int sendDirectPing(DKSRef target)
           
 void sendKeepAlive()
           
 void strechMeasurementMsgHandler(DKSRef source, StrechMeasurementMsg msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanetLabDKS

public PlanetLabDKS()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

sendDirectPing

public int sendDirectPing(DKSRef target)

sendKeepAlive

public void sendKeepAlive()

pingMsgHandler

public void pingMsgHandler(DKSRef source,
                           PingMsg msg)

pongMsgHandler

public void pongMsgHandler(DKSRef source,
                           PongMsg msg)

strechMeasurementMsgHandler

public void strechMeasurementMsgHandler(DKSRef source,
                                        StrechMeasurementMsg msg)

liveNodesMsgHandler

public void liveNodesMsgHandler(DKSRef source,
                                LiveNodesMsg msg)

keepAliveMsgHandler

public void keepAliveMsgHandler(DKSRef source,
                                KeepAliveMsg msg)

dhtBroadcastCallback

public void dhtBroadcastCallback(DKSObject value)
Description copied from interface: DKSDHTCallback
Receive a broadcast message

Specified by:
dhtBroadcastCallback in interface DKSDHTCallback

dhtRouteCallback

public DKSMessage dhtRouteCallback(long identifier,
                                   DKSMessage msg)
Description copied from interface: DKSDHTCallback
The callback is called at the responsible node when a route() message reaches its destination and the message is not handled at a lower abstraction layer. It receives a DKSMessage, and returns a possibly new DKSMessage INVARIANT: the implementor of this method SHOULD immediately return, as otherwise the underlying DKSNode cannot process new messagesl, and consequently the method cannot recursively call other methods in the DKSInterface as the DKSNode will not be able to receive response messages. Consider using routeAsync() in DKSInterface.

Specified by:
dhtRouteCallback in interface DKSDHTCallback
Parameters:
identifier - long, the identifier searched for in route, maybe not interesting for the app in many cases.
Returns:
DKSObject the payload to be routed back or null if the message is unhandled

dhtRouteCallbackAsync

public void dhtRouteCallbackAsync(long identifier,
                                  DKSMessage msg)
Description copied from interface: DKSDHTCallback
The callback is called at the responsible node when a route() message reaches its destination and the message is not handled at a lower abstraction layer. It receives a DKSMessage

Specified by:
dhtRouteCallbackAsync in interface DKSDHTCallback
Parameters:
identifier - long, the identifier searched for in route, maybe not interesting for the app in many cases.
msg - DKSObject, the actual payload sent by the source


Copyright © 2010. All Rights Reserved.