Rice Pastry API

rice.tutorial.rawserialization
Class MyApp

java.lang.Object
  extended byrice.tutorial.rawserialization.MyApp
All Implemented Interfaces:
Application

public class MyApp
extends java.lang.Object
implements Application

A very simple application.

Version:
$Id: pretty.settings 2305 2005-03-11 20:22:33Z jeffh $
Author:
Jeff Hoye

Field Summary
protected  Endpoint endpoint
          The Endpoint represents the underlieing node.
protected  Node node
          The node we were constructed on.
 
Constructor Summary
MyApp(Node node)
          Constructor for MyApp.
 
Method Summary
 void deliver(Id id, Message message)
          Called when we receive a message.
 boolean forward(RouteMessage message)
          Called a message travels along your path.
 Node getNode()
          Getter for the node.
 void routeMyMsg(Id id)
          Called to route a message to the id
 void routeMyMsgDirect(NodeHandle nh)
          Called to directly send a message to the nh
 java.lang.String toString()
          DESCRIBE THE METHOD
 void update(NodeHandle handle, boolean joined)
          Called when you hear about a new neighbor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

endpoint

protected Endpoint endpoint
The Endpoint represents the underlieing node. By making calls on the Endpoint, it assures that the message will be delivered to a MyApp on whichever node the message is intended for.


node

protected Node node
The node we were constructed on.

Constructor Detail

MyApp

public MyApp(Node node)
Constructor for MyApp.

Parameters:
node - DESCRIBE THE PARAMETER
Method Detail

getNode

public Node getNode()
Getter for the node.

Returns:
The Node value

routeMyMsg

public void routeMyMsg(Id id)
Called to route a message to the id

Parameters:
id - DESCRIBE THE PARAMETER

routeMyMsgDirect

public void routeMyMsgDirect(NodeHandle nh)
Called to directly send a message to the nh

Parameters:
nh - DESCRIBE THE PARAMETER

deliver

public void deliver(Id id,
                    Message message)
Called when we receive a message.

Specified by:
deliver in interface Application
Parameters:
id - DESCRIBE THE PARAMETER
message - DESCRIBE THE PARAMETER

update

public void update(NodeHandle handle,
                   boolean joined)
Called when you hear about a new neighbor. Don't worry about this method for now.

Specified by:
update in interface Application
Parameters:
handle - DESCRIBE THE PARAMETER
joined - DESCRIBE THE PARAMETER

forward

public boolean forward(RouteMessage message)
Called a message travels along your path. Don't worry about this method for now.

Specified by:
forward in interface Application
Parameters:
message - DESCRIBE THE PARAMETER
Returns:
DESCRIBE THE RETURN VALUE

toString

public java.lang.String toString()
DESCRIBE THE METHOD

Returns:
DESCRIBE THE RETURN VALUE

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection