|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrice.pastry.messaging.Message
rice.scribe.messaging.ScribeMessage
rice.scribe.messaging.MessageAnycast
MessageAnycast is used whenever a Scribe node wishes to anycast to a particular topic. This method implements the DFS of the scribe topic tree. Applications which want different handling of anycast messages, might sub-class this class to write their own tree traversal algorithms. Whenever a local node receives anycast message for a topic after doing the DFS, it invokes the anycastHandler() on applications registered for this topic. If local applications can satisfy the request of anycast, then anycast message is not routed furthur otherwise tree traversal is continued. If no node is able to satisfy the anycast request, the faultHandler() method is invoked, where application specific handling can be done.
Field Summary |
Fields inherited from class rice.scribe.messaging.ScribeMessage |
m_source, m_topicId |
Constructor Summary | |
MessageAnycast(Address addr,
NodeHandle source,
NodeId topicId,
Credentials cred)
Constructor |
Method Summary | |
int |
alreadySeenSize()
Method returns the number of nodes visited during the DFS. |
void |
faultHandler(Scribe scribe)
Method to notify that anycast has failed. |
void |
handleDeliverMessage(Scribe scribe,
Topic topic)
This method is called whenever the scribe node receives a message for itself and wants to process it. |
boolean |
handleForwardMessage(Scribe scribe,
Topic topic)
This method is called whenever the scribe node forwards a message in the scribe network. |
java.lang.String |
toString()
|
Methods inherited from class rice.scribe.messaging.ScribeMessage |
getData, getSource, getTopicId, setData |
Methods inherited from class rice.pastry.messaging.Message |
getCredentials, getDate, getDestination, getSenderId, getStream, hasPriority, setPriority, setSenderId, stamp |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MessageAnycast(Address addr, NodeHandle source, NodeId topicId, Credentials cred)
addr
- the address of the scribe receiver.source
- the node generating the message.topicId
- the topic to which this message refers to.cred
- the credentials associated with the mesasge.Method Detail |
public void handleDeliverMessage(Scribe scribe, Topic topic)
handleDeliverMessage
in class ScribeMessage
scribe
- the scribe application.topic
- the topic within the scribe application.public boolean handleForwardMessage(Scribe scribe, Topic topic)
handleForwardMessage
in class ScribeMessage
scribe
- the scribe application.topic
- the topic within the scribe application.
public int alreadySeenSize()
public void faultHandler(Scribe scribe)
scribe
- The scribe object present on the local nodepublic java.lang.String toString()
toString
in class ScribeMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |