|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--rice.pastry.messaging.Message | +--rice.scribe.messaging.ScribeMessage
This is an abstract implementation of a Scribe message object.
Field Summary | |
protected rice.pastry.NodeHandle |
m_source
The ID of the source of this message. |
protected rice.pastry.NodeId |
m_topicId
The ID of the topic that this message refers to. |
Constructor Summary | |
ScribeMessage(rice.pastry.messaging.Address addr,
rice.pastry.NodeHandle source,
rice.pastry.NodeId tid,
rice.pastry.security.Credentials c)
Constructor |
Method Summary | |
java.io.Serializable |
getData()
Gets the data inside of the ScribeMessage object. |
rice.pastry.NodeHandle |
getSource()
Returns the nodeId of the node that generated the message. |
rice.pastry.NodeId |
getTopicId()
Returns the topicId associated with the message. |
abstract 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. |
abstract 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. |
void |
setData(java.io.Serializable data)
Sets the data contained in the message. |
abstract java.lang.String |
toString()
|
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 |
Field Detail |
protected rice.pastry.NodeId m_topicId
protected rice.pastry.NodeHandle m_source
Constructor Detail |
public ScribeMessage(rice.pastry.messaging.Address addr, rice.pastry.NodeHandle source, rice.pastry.NodeId tid, rice.pastry.security.Credentials c)
addr
- the address of the scribe receiver.source
- the node generating the message.c
- the credentials associated with the mesasge.Method Detail |
public abstract void handleDeliverMessage(rice.scribe.Scribe scribe, rice.scribe.Topic topic)
scribe
- the scribe applicationtopic
- the topic within the scribe applicationpublic abstract boolean handleForwardMessage(rice.scribe.Scribe scribe, rice.scribe.Topic topic)
scribe
- the scribe application.topic
- the topic within the scribe application.
public void setData(java.io.Serializable data)
data
- the data contained in the message.public java.io.Serializable getData()
public rice.pastry.NodeId getTopicId()
public rice.pastry.NodeHandle getSource()
public abstract 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 |