ePOST API

rice.p2p.scribe.messaging
Class SubscribeMessage

java.lang.Object
  extended by rice.p2p.scribe.messaging.ScribeMessage
      extended by rice.p2p.scribe.messaging.AnycastMessage
          extended by rice.p2p.scribe.messaging.SubscribeMessage
All Implemented Interfaces:
java.io.Serializable, Message

public class SubscribeMessage
extends AnycastMessage

Version:
$Id: SubscribeMessage.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  int id
          The id of this message
protected  Id previousParent
          The previous parent
protected  NodeHandle subscriber
          The original subscriber
 
Fields inherited from class rice.p2p.scribe.messaging.AnycastMessage
content, toVisit, visited
 
Fields inherited from class rice.p2p.scribe.messaging.ScribeMessage
source, topic
 
Fields inherited from interface rice.p2p.commonapi.Message
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_HIGH_PRIORITY, MEDIUM_LOW_PRIORITY, MEDIUM_PRIORITY
 
Constructor Summary
SubscribeMessage(NodeHandle source, Topic topic, Id previousParent, int id, ScribeContent content)
          Constructor which takes a unique integer Id
SubscribeMessage(NodeHandle source, Topic topic, int id, ScribeContent content)
          Constructor which takes a unique integer Id
 
Method Summary
 int getId()
          Returns this subscribe lost message's id
 Id getPreviousParent()
          Returns the node who is trying to subscribe
 NodeHandle getSubscriber()
          Returns the node who is trying to subscribe
 java.lang.String toString()
          Returns a String represneting this message
 
Methods inherited from class rice.p2p.scribe.messaging.AnycastMessage
addFirst, addLast, addVisited, getContent, getNext, peekNext, remove, setContent
 
Methods inherited from class rice.p2p.scribe.messaging.ScribeMessage
getPriority, getSource, getTopic, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

subscriber

protected NodeHandle subscriber
The original subscriber


previousParent

protected Id previousParent
The previous parent


id

protected int id
The id of this message

Constructor Detail

SubscribeMessage

public SubscribeMessage(NodeHandle source,
                        Topic topic,
                        int id,
                        ScribeContent content)
Constructor which takes a unique integer Id

Parameters:
source - The source address
topic - The topic
id - The UID for this message
content - The content

SubscribeMessage

public SubscribeMessage(NodeHandle source,
                        Topic topic,
                        Id previousParent,
                        int id,
                        ScribeContent content)
Constructor which takes a unique integer Id

Parameters:
source - The source address
topic - The topic
id - The UID for this message
content - The content
previousParent - The parent on this topic who died
Method Detail

getSubscriber

public NodeHandle getSubscriber()
Returns the node who is trying to subscribe

Returns:
The node who is attempting to subscribe

getPreviousParent

public Id getPreviousParent()
Returns the node who is trying to subscribe

Returns:
The node who is attempting to subscribe

getId

public int getId()
Returns this subscribe lost message's id

Returns:
The id of this subscribe lost message

toString

public java.lang.String toString()
Returns a String represneting this message

Overrides:
toString in class java.lang.Object
Returns:
A String of this message

ePOST API

Copyright © 2001-2005 - Rice Pastry.