|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.tutorial.lesson6.MyScribeClient
We implement the Application interface to receive regular timed messages (see lesson5). We implement the ScribeClient interface to receive scribe messages (called ScribeContent).
Field Summary | |
protected Endpoint |
endpoint
The Endpoint represents the underlieing node. |
Constructor Summary | |
MyScribeClient(Node node)
The constructor for this scribe client. |
Method Summary | |
boolean |
anycast(Topic topic,
ScribeContent content)
Called when we receive an anycast. |
void |
childAdded(Topic topic,
NodeHandle child)
DESCRIBE THE METHOD |
void |
childRemoved(Topic topic,
NodeHandle child)
DESCRIBE THE METHOD |
void |
deliver(Id id,
Message message)
Part of the Application interface. |
void |
deliver(Topic topic,
ScribeContent content)
Called whenever we receive a published message. |
boolean |
forward(RouteMessage message)
DESCRIBE THE METHOD |
NodeHandle[] |
getChildren()
Gets the Children attribute of the MyScribeClient object |
NodeHandle |
getParent()
Gets the Parent attribute of the MyScribeClient object |
boolean |
isRoot()
Some passthrough accessors for the myScribe ************ |
void |
sendAnycast()
Sends an anycast message. |
void |
sendMulticast()
Sends the multicast message. |
void |
startPublishTask()
Starts the publish task. |
void |
subscribe()
Subscribes to myTopic. |
void |
subscribeFailed(Topic topic)
DESCRIBE THE METHOD |
void |
update(NodeHandle handle,
boolean joined)
DESCRIBE THE METHOD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Endpoint endpoint
Constructor Detail |
public MyScribeClient(Node node)
node
- the PastryNodeMethod Detail |
public boolean isRoot()
public NodeHandle getParent()
public NodeHandle[] getChildren()
public void subscribe()
public void startPublishTask()
public void deliver(Id id, Message message)
deliver
in interface Application
id
- DESCRIBE THE PARAMETERmessage
- DESCRIBE THE PARAMETERpublic void sendMulticast()
public void deliver(Topic topic, ScribeContent content)
deliver
in interface ScribeClient
topic
- DESCRIBE THE PARAMETERcontent
- DESCRIBE THE PARAMETERpublic void sendAnycast()
public boolean anycast(Topic topic, ScribeContent content)
anycast
in interface ScribeClient
topic
- DESCRIBE THE PARAMETERcontent
- DESCRIBE THE PARAMETER
public void childAdded(Topic topic, NodeHandle child)
childAdded
in interface ScribeClient
topic
- DESCRIBE THE PARAMETERchild
- DESCRIBE THE PARAMETERpublic void childRemoved(Topic topic, NodeHandle child)
childRemoved
in interface ScribeClient
topic
- DESCRIBE THE PARAMETERchild
- DESCRIBE THE PARAMETERpublic void subscribeFailed(Topic topic)
subscribeFailed
in interface ScribeClient
topic
- DESCRIBE THE PARAMETERpublic boolean forward(RouteMessage message)
forward
in interface Application
message
- DESCRIBE THE PARAMETER
public void update(NodeHandle handle, boolean joined)
update
in interface Application
handle
- DESCRIBE THE PARAMETERjoined
- DESCRIBE THE PARAMETER
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |