org.planx.routing.kademlia.operation
Class DataLookupReceiver

java.lang.Object
  extended by org.planx.routing.kademlia.operation.OriginReceiver
      extended by org.planx.routing.kademlia.operation.DataLookupReceiver
All Implemented Interfaces:
Receiver

public class DataLookupReceiver
extends OriginReceiver

Responds to a DataLookupMessage by sending a DataMessage containing the requested mapping or by sending a NodeReplyMessage containing the K closest nodes to the request key known by this node.


Constructor Summary
DataLookupReceiver(MessageServer server, Node local, Space space, Map localMap)
           
 
Method Summary
 void receive(Message incoming, int comm)
          Updates the local space by inserting the origin node.
 
Methods inherited from class org.planx.routing.kademlia.operation.OriginReceiver
timeout
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataLookupReceiver

public DataLookupReceiver(MessageServer server,
                          Node local,
                          Space space,
                          Map localMap)
Method Detail

receive

public void receive(Message incoming,
                    int comm)
             throws IOException,
                    UnknownMessageException
Description copied from class: OriginReceiver
Updates the local space by inserting the origin node. Note that if the node already exists in the local space, it's time last seen is updated instead.

Specified by:
receive in interface Receiver
Overrides:
receive in class OriginReceiver
Throws:
IOException - if an I/O error occurs
UnknownMessageException - if the message or comm was unexpected


Copyright © 2004-2005 Plan-X. All Rights Reserved.