|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrice.tutorial.prioritylistener.MyApp
public class MyApp
A very simple application.
| 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)
|
|
| 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()
|
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 |
|---|
protected Endpoint endpoint
protected Node node
| Constructor Detail |
|---|
public MyApp(Node node)
| Method Detail |
|---|
public Node getNode()
public void routeMyMsg(Id id)
public void routeMyMsgDirect(NodeHandle nh)
public void deliver(Id id,
Message message)
deliver in interface Applicationid - The destination id of the messagemessage - The message being sent
public void update(NodeHandle handle,
boolean joined)
update in interface Applicationhandle - The handle that has joined/leftjoined - Whether the node has joined or leftpublic boolean forward(RouteMessage message)
forward in interface Applicationmessage - The message being sent, containing an internal message
along with a destination key and nodeHandle next hop.
public java.lang.String toString()
toString in class java.lang.Object
|
Rice Pastry API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||