ePOST API

rice.pastry.testing
Class RegrTestApp

java.lang.Object
  extended by rice.pastry.client.PastryAppl
      extended by rice.pastry.client.CommonAPIAppl
          extended by 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 3048 2006-02-10 16:25:33Z jeffh $
Author:
andrew ladd, peter druschel

Field Summary
 
Fields inherited from class rice.pastry.client.PastryAppl
address, instance, logger, thePastryNode
 
Constructor Summary
RegrTestApp(PastryNode pn, PastryRegrTest prg)
           
 
Method Summary
 void deliver(Id key, Message msg)
          Called by pastry when a message arrives for this application.
 void forward(RouteMessage rm)
          Called by pastry when a message is enroute and is passing through this node.
 Address getAddress()
          Returns the address of this application.
 Credentials getCredentials()
          Returns the credentials of this application.
 PastryNode getPastryNode()
           
 void notifyReady()
          Invoked when the Pastry node has joined the overlay network and is ready to send and receive messages
 void routeSetChange(NodeHandle nh, boolean wasAdded)
          Called by pastry when the route set changes.
 void sendMsg(NodeId nid)
           
 void sendTrace(NodeId nid)
           
 void update(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
deliverWhenNotReady, destroy, enrouteMessage, getLeafSet, getNodeHandle, getNodeId, getRoutingTable, isClosest, register, 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(PastryNode pn,
                   PastryRegrTest prg)
Method Detail

getAddress

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

Overrides:
getAddress in class PastryAppl
Returns:
the address.

getCredentials

public 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(NodeId nid)

sendTrace

public void sendTrace(NodeId nid)

deliver

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

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

forward

public void forward(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(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(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

getPastryNode

public PastryNode getPastryNode()

ePOST API

Copyright © 2001-2005 - Rice Pastry.