Rice Pastry API

rice.pastry.standard
Class StandardRouteSetProtocol

java.lang.Object
  extended by rice.pastry.client.PastryAppl
      extended by rice.pastry.standard.StandardRouteSetProtocol

public class StandardRouteSetProtocol
extends PastryAppl

An implementation of a simple route set protocol.

Version:
$Id: StandardRouteSetProtocol.java,v 1.15 2005/03/11 00:58:02 jeffh Exp $
Author:
Andrew Ladd, Peter Druschel

Field Summary
protected  Logger logger
           
 
Fields inherited from class rice.pastry.client.PastryAppl
address, deserializer, instance, receiver, thePastryNode
 
Constructor Summary
StandardRouteSetProtocol(PastryNode ln, RoutingTable rt, Environment env)
          Constructor.
StandardRouteSetProtocol(PastryNode ln, RoutingTable rt, Environment env, MessageDeserializer md)
           
 
Method Summary
 boolean deliverWhenNotReady()
          Instructs the MessageDispatch how to behave when the PastryNode is not ready.
 void messageForAppl(Message msg)
          Receives a message.
 
Methods inherited from class rice.pastry.client.PastryAppl
accept, connect, destroy, enrouteMessage, getAddress, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, leafSetChange, notifyReady, receiveMessage, receiveMessageInternal, receiveSocket, register, routeMsg, routeMsgDirect, routeSetChange, setDeserializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Constructor Detail

StandardRouteSetProtocol

public StandardRouteSetProtocol(PastryNode ln,
                                RoutingTable rt,
                                Environment env)
Constructor.

Parameters:
lh - the local handle
sm - the security manager
rt - the routing table

StandardRouteSetProtocol

public StandardRouteSetProtocol(PastryNode ln,
                                RoutingTable rt,
                                Environment env,
                                MessageDeserializer md)
Method Detail

messageForAppl

public void messageForAppl(Message msg)
Receives a message.

Specified by:
messageForAppl in class PastryAppl
Parameters:
msg - the message.

deliverWhenNotReady

public boolean deliverWhenNotReady()
Description copied from class: PastryAppl
Instructs the MessageDispatch how to behave when the PastryNode is not ready. An application can override this method to return true if it wishes to receive messages before Pastry is ready(). Most applications should leave this as false, so that their application does not have inconsistent routing. However Pastry's protocols (such as the join protocol) need to receive messages before pastry is ready(). This is because they are attempting to make pastry ready().

Overrides:
deliverWhenNotReady in class PastryAppl
Returns:
false unless the node is a service

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection