Rice Pastry API

rice.pastry.testing
Class RegrTestApp

java.lang.Object
  |
  +--rice.pastry.client.PastryAppl
        |
        +--rice.pastry.client.CommonAPIAppl
              |
              +--rice.pastry.testing.RegrTestApp
All Implemented Interfaces:
MessageReceiver

public class RegrTestApp
extends CommonAPIAppl

RegrTestApp A regression test suite for pastry. This is the per-node app object.

Version:
$Id: RegrTestApp.java,v 1.18 2003/07/21 19:45:47 druschel Exp $
Author:
andrew ladd, peter druschel

Field Summary
 
Fields inherited from class rice.pastry.client.PastryAppl
address, instance, thePastryNode
 
Constructor Summary
RegrTestApp(rice.pastry.PastryNode pn, rice.pastry.testing.PastryRegrTest prg)
           
 
Method Summary
 void deliver(rice.pastry.Id key, rice.pastry.messaging.Message msg)
          Called by pastry when a message arrives for this application.
 void forward(rice.pastry.routing.RouteMessage rm)
          Called by pastry when a message is enroute and is passing through this node.
 rice.pastry.messaging.Address getAddress()
          Returns the address of this application.
 rice.pastry.security.Credentials getCredentials()
          Returns the credentials of this application.
 void notifyReady()
          Invoked when the Pastry node has joined the overlay network and is ready to send and receive messages
 void routeSetChange(rice.pastry.NodeHandle nh, boolean wasAdded)
          Called by pastry when the route set changes.
 void sendMsg(rice.pastry.NodeId nid)
           
 void sendTrace(rice.pastry.NodeId nid)
           
 void update(rice.pastry.NodeHandle nh, boolean wasAdded)
          Called by pastry when the neighbor set changes.
 
Methods inherited from class rice.pastry.client.CommonAPIAppl
leafSetChange, localLookup, messageForAppl, neighborSet, range, range, receiveMessage, replicaSet, route
 
Methods inherited from class rice.pastry.client.PastryAppl
enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, registerReceiver, routeMsg, routeMsgDirect, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegrTestApp

public RegrTestApp(rice.pastry.PastryNode pn,
                   rice.pastry.testing.PastryRegrTest prg)
Method Detail

getAddress

public rice.pastry.messaging.Address getAddress()
Description copied from class: PastryAppl
Returns the address of this application.

Overrides:
getAddress in class PastryAppl
Returns:
the address.

getCredentials

public rice.pastry.security.Credentials getCredentials()
Description copied from class: CommonAPIAppl
Returns the credentials of this application.

Specified by:
getCredentials in class CommonAPIAppl
Returns:
the credentials.

sendMsg

public void sendMsg(rice.pastry.NodeId nid)

sendTrace

public void sendTrace(rice.pastry.NodeId nid)

deliver

public void deliver(rice.pastry.Id key,
                    rice.pastry.messaging.Message msg)
Description copied from class: CommonAPIAppl
Called by pastry when a message arrives for this application.

Specified by:
deliver in class CommonAPIAppl
Parameters:
msg - the message that is arriving.

forward

public void forward(rice.pastry.routing.RouteMessage rm)
Description copied from class: CommonAPIAppl
Called by pastry when a message is enroute and is passing through this node. If this method is not overridden, the default behaviour is to let the message pass through.

Overrides:
forward in class CommonAPIAppl
Parameters:
rm - the message that is passing through.

update

public void update(rice.pastry.NodeHandle nh,
                   boolean wasAdded)
Description copied from class: CommonAPIAppl
Called by pastry when the neighbor set changes.

Overrides:
update in class CommonAPIAppl
Parameters:
nh - the handle of the node that was added or removed.

routeSetChange

public void routeSetChange(rice.pastry.NodeHandle nh,
                           boolean wasAdded)
Description copied from class: PastryAppl
Called by pastry when the route set changes.

Overrides:
routeSetChange in class PastryAppl
Parameters:
nh - the handle of the node that was added or removed.
wasAdded - true if the node was added, false if the node was removed.

notifyReady

public void notifyReady()
Invoked when the Pastry node has joined the overlay network and is ready to send and receive messages

Overrides:
notifyReady in class CommonAPIAppl

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection