rice.scribe.messaging
Class MessagePublish
java.lang.Object
|
+--rice.pastry.messaging.Message
|
+--rice.scribe.messaging.ScribeMessage
|
+--rice.scribe.messaging.MessagePublish
- All Implemented Interfaces:
- java.io.Serializable
- public class MessagePublish
- extends ScribeMessage
- implements java.io.Serializable
MessagePublish is used whenever a Scribe nodes wishes to send events
to a particular topic. The PublishMessage takes care of forwarding itself
to all the nodes in the topic's multicast tree.
- Version:
- $Id: MessagePublish.java,v 1.12 2003/02/11 17:55:23 atuls Exp $
- Author:
- Romer Gil, Eric Engineer, Atul Singh, Animesh Nandi
- See Also:
- Serialized Form
|
Constructor Summary |
MessagePublish(rice.pastry.messaging.Address addr,
rice.pastry.NodeHandle source,
rice.pastry.NodeId topicId,
rice.pastry.security.Credentials c)
Constructor |
|
Method Summary |
void |
handleDeliverMessage(rice.scribe.Scribe scribe,
rice.scribe.Topic topic)
This method is called whenever the scribe node receives a message for
itself and wants to process it. |
boolean |
handleForwardMessage(rice.scribe.Scribe scribe,
rice.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MessagePublish
public MessagePublish(rice.pastry.messaging.Address addr,
rice.pastry.NodeHandle source,
rice.pastry.NodeId topicId,
rice.pastry.security.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(rice.scribe.Scribe scribe,
rice.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(rice.scribe.Scribe scribe,
rice.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
Copyright © 2001 - Rice Pastry.