Rice Pastry API

rice.p2p.scribe
Interface BaseScribe

All Superinterfaces:
Destructable
All Known Subinterfaces:
JavaScribe, MaintainableScribe, RawScribe, Scribe
All Known Implementing Classes:
ScribeImpl

public interface BaseScribe
extends Destructable

Scribe functions not specific to serialization type.

Author:
Jeff Hoye

Method Summary
 void addChild(Topic topic, NodeHandle child)
          Adds a child to the given topic
 boolean containsChild(Topic topic, NodeHandle child)
           
 boolean containsTopic(Topic topic)
          Returns true if there is a TopicManager object corresponding to this topic
 NodeHandle[] getChildren(Topic topic)
          Deprecated. use getChildrenOfTopic
 java.util.Collection<NodeHandle> getChildrenOfTopic(Topic topic)
           
 java.util.Collection<ScribeClient> getClients(Topic topic)
           
 java.util.Collection<ScribeMultiClient> getClientsByTopic(Topic topic)
           
 Environment getEnvironment()
           
 NodeHandle getParent(Topic topic)
          Returns the parent node for a given topic
 ScribePolicy getPolicy()
          Returns the current policy for this scribe object
 NodeHandle getRoot(Topic topic)
          Returns the root of the topic, if we can determine it.
 Topic[] getTopics(ScribeClient client)
          Deprecated. use getTopicsByClient()
 java.util.Collection<Topic> getTopicsByClient(ScribeClient client)
           
 java.util.Collection<Topic> getTopicsByClient(ScribeMultiClient client)
           
 boolean isRoot(Topic topic)
          Returns whether or not this Scribe is the root for the given topic
 int numChildren(Topic topic)
           
 void removeChild(Topic topic, NodeHandle child)
          Removes a child from the given topic
 void setPolicy(ScribePolicy policy)
          Sets the current policy for this scribe object
 void subscribe(Topic topic, ScribeClient client)
          Deprecated. use subscribe(Topic, ScribeMultiClient, ScribeContent, NodeHandle hint)
 void unsubscribe(java.util.Collection<Topic> topicsToUnsubscribe, ScribeMultiClient client)
           
 void unsubscribe(Topic topic, ScribeClient client)
          Deprecated. use unsubscribe(Topic, ScribeMultiClient)
 void unsubscribe(Topic topic, ScribeMultiClient client)
           
 
Methods inherited from interface rice.Destructable
destroy
 

Method Detail

subscribe

void subscribe(Topic topic,
               ScribeClient client)
Deprecated. use subscribe(Topic, ScribeMultiClient, ScribeContent, NodeHandle hint)

Subscribes the given client to the provided topic. Any message published to the topic will be delivered to the Client via the deliver() method.

Parameters:
topic - The topic to subscribe to
client - The client to give messages to

unsubscribe

void unsubscribe(Topic topic,
                 ScribeClient client)
Deprecated. use unsubscribe(Topic, ScribeMultiClient)

Unsubscribes the given client from the provided topic.

Parameters:
topic - The topic to unsubscribe from
client - The client to unsubscribe

unsubscribe

void unsubscribe(Topic topic,
                 ScribeMultiClient client)

unsubscribe

void unsubscribe(java.util.Collection<Topic> topicsToUnsubscribe,
                 ScribeMultiClient client)

addChild

void addChild(Topic topic,
              NodeHandle child)
Adds a child to the given topic

Parameters:
topic - The topic to add the child to
child - The child to add

removeChild

void removeChild(Topic topic,
                 NodeHandle child)
Removes a child from the given topic

Parameters:
topic - The topic to remove the child from
child - The child to remove

isRoot

boolean isRoot(Topic topic)
Returns whether or not this Scribe is the root for the given topic

Parameters:
topic - The topic in question
Returns:
Whether or not we are currently the root

getRoot

NodeHandle getRoot(Topic topic)
Returns the root of the topic, if we can determine it.

Parameters:
topic -
Returns:
null if beyond our knowledge range

getChildren

NodeHandle[] getChildren(Topic topic)
Deprecated. use getChildrenOfTopic

Returns the list of children for a given topic

Parameters:
topic - The topic to return the children of
Returns:
The children of the topic

getChildrenOfTopic

java.util.Collection<NodeHandle> getChildrenOfTopic(Topic topic)

getParent

NodeHandle getParent(Topic topic)
Returns the parent node for a given topic

Parameters:
myTopic - The topic to return the parent of
Returns:
The parent of the topic

getTopics

Topic[] getTopics(ScribeClient client)
Deprecated. use getTopicsByClient()

Returns the list of topics the given client is subscribed to.

Parameters:
client - The client in question
Returns:
The list of topics

getTopicsByClient

java.util.Collection<Topic> getTopicsByClient(ScribeClient client)

getTopicsByClient

java.util.Collection<Topic> getTopicsByClient(ScribeMultiClient client)

numChildren

int numChildren(Topic topic)

getClients

java.util.Collection<ScribeClient> getClients(Topic topic)

getClientsByTopic

java.util.Collection<ScribeMultiClient> getClientsByTopic(Topic topic)

containsTopic

boolean containsTopic(Topic topic)
Returns true if there is a TopicManager object corresponding to this topic


containsChild

boolean containsChild(Topic topic,
                      NodeHandle child)

getPolicy

ScribePolicy getPolicy()
Returns the current policy for this scribe object

Returns:
The current policy for this scribe

setPolicy

void setPolicy(ScribePolicy policy)
Sets the current policy for this scribe object

Parameters:
policy - The current policy for this scribe

getEnvironment

Environment getEnvironment()

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection