peerbase.util
Class SimpleRouter

java.lang.Object
  extended by peerbase.util.SimpleRouter
All Implemented Interfaces:
RouterInterface

public class SimpleRouter
extends java.lang.Object
implements RouterInterface

A simple router that attempts to route messages by simply looking for the destination peer information in the node's list of peers. If the destination node is not an immediate neighbor, this function fails.

Author:
Nadeem Abdul Hamid

Constructor Summary
SimpleRouter(Node peer)
           
 
Method Summary
 PeerInfo route(java.lang.String peerid)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRouter

public SimpleRouter(Node peer)
Method Detail

route

public PeerInfo route(java.lang.String peerid)
Specified by:
route in interface RouterInterface