rice.scribe.messaging
Class MessageCreate
java.lang.Object
rice.pastry.messaging.Message
rice.scribe.messaging.ScribeMessage
rice.scribe.messaging.MessageCreate
- All Implemented Interfaces:
- java.io.Serializable
- public class MessageCreate
- extends ScribeMessage
- implements java.io.Serializable
MessageCreate is used whenever a Scribe node wants to create a
new topic. The message makes its way to the root (the node currently
closest to the topic Id) for the topic and takes care of instantiating
the appropriate data structures on that node to keep track of the topic.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MessageCreate
public MessageCreate(Address addr,
NodeHandle source,
NodeId topicId,
Credentials c)
- Constructor.
- Parameters:
addr
- the address of the scribe receiver.source
- the node generating the message.topicId
- the topic to which this message refers to.c
- the credentials associated with the mesasge.
handleDeliverMessage
public void handleDeliverMessage(Scribe scribe,
Topic topic)
- This method is called whenever the scribe node receives a message for
itself and wants to process it. The processing is delegated by scribe
to the message.
- Specified by:
handleDeliverMessage
in class ScribeMessage
- Parameters:
scribe
- the scribe application.topic
- the topic within the scribe application.
handleForwardMessage
public boolean handleForwardMessage(Scribe scribe,
Topic topic)
- This method is called whenever the scribe node forwards a message in
the scribe network. The processing is delegated by scribe to the
message.
- Specified by:
handleForwardMessage
in class ScribeMessage
- Parameters:
scribe
- the scribe application.topic
- the topic within the scribe application.
- Returns:
- true if the message should be routed further, false otherwise.
toString
public java.lang.String toString()
- Specified by:
toString
in class ScribeMessage