Rice Pastry API

rice.p2p.scribe
Interface ScribeClient

All Known Implementing Classes:
ScribeRegrTest.TestScribeClient, Stripe

public interface ScribeClient

Version:
$Id: ScribeClient.java,v 1.2 2003/10/14 01:49:57 amislove Exp $
Author:
Alan Mislove

Method Summary
 boolean anycast(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeContent content)
          This method is invoked when an anycast is received for a topic which this client is interested in.
 void childAdded(rice.p2p.scribe.Topic topic, rice.p2p.commonapi.NodeHandle child)
          Informs this client that a child was added to a topic in which it was interested in.
 void childRemoved(rice.p2p.scribe.Topic topic, rice.p2p.commonapi.NodeHandle child)
          Informs this client that a child was removed from a topic in which it was interested in.
 void deliver(rice.p2p.scribe.Topic topic, rice.p2p.scribe.ScribeContent content)
          This method is invoked when a message is delivered for a topic this client is interested in.
 void subscribeFailed(rice.p2p.scribe.Topic topic)
          Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.
 

Method Detail

anycast

public boolean anycast(rice.p2p.scribe.Topic topic,
                       rice.p2p.scribe.ScribeContent content)
This method is invoked when an anycast is received for a topic which this client is interested in. The client should return whether or not the anycast should continue.

Parameters:
topic - The topic the message was anycasted to
content - The content which was anycasted
Returns:
Whether or not the anycast should continue

deliver

public void deliver(rice.p2p.scribe.Topic topic,
                    rice.p2p.scribe.ScribeContent content)
This method is invoked when a message is delivered for a topic this client is interested in.

Parameters:
topic - The topic the message was published to
content - The content which was published

childAdded

public void childAdded(rice.p2p.scribe.Topic topic,
                       rice.p2p.commonapi.NodeHandle child)
Informs this client that a child was added to a topic in which it was interested in.

Parameters:
topic - The topic to unsubscribe from
child - The child that was added

childRemoved

public void childRemoved(rice.p2p.scribe.Topic topic,
                         rice.p2p.commonapi.NodeHandle child)
Informs this client that a child was removed from a topic in which it was interested in.

Parameters:
topic - The topic to unsubscribe from
child - The child that was removed

subscribeFailed

public void subscribeFailed(rice.p2p.scribe.Topic topic)
Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.

Parameters:
topic - The topic which the subscribe failed on

Rice Pastry API

Copyright © 2001 - Rice Pastry.


Imprint-Dataprotection