org.planx.routing.kademlia.operation
Class ResponsibleOperation

java.lang.Object
  extended by org.planx.routing.kademlia.operation.ResponsibleOperation
All Implemented Interfaces:
Operation<List<InetSocketAddress>>

public class ResponsibleOperation
extends Object
implements Operation<List<InetSocketAddress>>

Finds the K closest nodes to a specified identifier and returns their associated peer information objects.

Author:
Thomas Ambus

Constructor Summary
ResponsibleOperation(Configuration conf, MessageServer server, Space space, Node local, Identifier key)
           
 
Method Summary
 List<InetSocketAddress> execute()
          Returns a List of InetSocketAddress objects identifying the K closest peers to the key specified in the constructor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponsibleOperation

public ResponsibleOperation(Configuration conf,
                            MessageServer server,
                            Space space,
                            Node local,
                            Identifier key)
Method Detail

execute

public List<InetSocketAddress> execute()
                                throws IOException,
                                       RoutingException
Returns a List of InetSocketAddress objects identifying the K closest peers to the key specified in the constructor.

Specified by:
execute in interface Operation<List<InetSocketAddress>>
Throws:
RoutingException - If the operation timed out
IOException - If a network error occurred


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