Rice Pastry API

rice.p2p.scribe.messaging
Class AnycastMessage

java.lang.Object
  |
  +--rice.p2p.scribe.messaging.ScribeMessage
        |
        +--rice.p2p.scribe.messaging.AnycastMessage
All Implemented Interfaces:
Message, java.io.Serializable
Direct Known Subclasses:
SubscribeMessage

public class AnycastMessage
extends ScribeMessage

Version:
$Id: AnycastMessage.java,v 1.6 2003/10/22 03:16:42 amislove Exp $
Author:
Alan Mislove
See Also:
Serialized Form

Field Summary
protected  rice.p2p.scribe.ScribeContent content
          the content of this message
protected  java.util.LinkedList toVisit
          the list of nodes which we are going to visit
protected  java.util.Vector visited
          the list of nodes which we have visited
 
Fields inherited from class rice.p2p.scribe.messaging.ScribeMessage
source, topic
 
Constructor Summary
AnycastMessage(rice.p2p.commonapi.NodeHandle source, rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeContent content)
          Constructor which takes a unique integer Id
 
Method Summary
 void addFirst(rice.p2p.commonapi.NodeHandle handle)
          Adds a node the the front of the to-visit list
 void addLast(rice.p2p.commonapi.NodeHandle handle)
          Adds a node the the end of the to-visit list
 void addVisited(rice.p2p.commonapi.NodeHandle handle)
          Adds a node to the visited list
 rice.p2p.scribe.ScribeContent getContent()
          Returns the content
 rice.p2p.commonapi.NodeHandle getNext()
          Returns the next handle to visit and removes the node from the list.
 rice.p2p.commonapi.NodeHandle peekNext()
          Returns the next handle to visit
 void remove(rice.p2p.commonapi.NodeHandle handle)
          Removes the node handle from the to visit and visited lists
 void setContent(rice.p2p.scribe.ScribeContent content)
          Sets the content
 
Methods inherited from class rice.p2p.scribe.messaging.ScribeMessage
getSource, getTopic, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

content

protected rice.p2p.scribe.ScribeContent content
the content of this message


visited

protected java.util.Vector visited
the list of nodes which we have visited


toVisit

protected java.util.LinkedList toVisit
the list of nodes which we are going to visit

Constructor Detail

AnycastMessage

public AnycastMessage(rice.p2p.commonapi.NodeHandle source,
                      rice.p2p.scribe.Topic topic,
                      rice.p2p.scribe.ScribeContent content)
Constructor which takes a unique integer Id

Parameters:
source - The source address
topic - The topic
content - The content
Method Detail

getContent

public rice.p2p.scribe.ScribeContent getContent()
Returns the content

Returns:
The content

setContent

public void setContent(rice.p2p.scribe.ScribeContent content)
Sets the content

Parameters:
content - The content

peekNext

public rice.p2p.commonapi.NodeHandle peekNext()
Returns the next handle to visit

Returns:
The next handle to visit

getNext

public rice.p2p.commonapi.NodeHandle getNext()
Returns the next handle to visit and removes the node from the list.

Returns:
The next handle to visit

addVisited

public void addVisited(rice.p2p.commonapi.NodeHandle handle)
Adds a node to the visited list

Parameters:
handle - The node to add

addFirst

public void addFirst(rice.p2p.commonapi.NodeHandle handle)
Adds a node the the front of the to-visit list

Parameters:
handle - The handle to add

addLast

public void addLast(rice.p2p.commonapi.NodeHandle handle)
Adds a node the the end of the to-visit list

Parameters:
handle - The handle to add

remove

public void remove(rice.p2p.commonapi.NodeHandle handle)
Removes the node handle from the to visit and visited lists

Parameters:
handle - The handle to remove

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection