Rice Pastry API

rice.p2p.scribe
Class ScribeImpl.ScribeClientConverter

java.lang.Object
  extended by rice.p2p.scribe.ScribeImpl.ScribeClientConverter
All Implemented Interfaces:
ScribeClient, ScribeMultiClient
Enclosing class:
ScribeImpl

public static class ScribeImpl.ScribeClientConverter
extends java.lang.Object
implements ScribeMultiClient

Adapts an old ScribeClient to a new ScribeMultiClient This is for reverse compatibility.


Constructor Summary
ScribeImpl.ScribeClientConverter(ScribeClient client)
           
 
Method Summary
 boolean anycast(Topic topic, ScribeContent content)
          This method is invoked when an anycast is received for a topic which this client is interested in.
 void childAdded(Topic topic, NodeHandle child)
          Informs this client that a child was added to a topic in which it was interested in.
 void childRemoved(Topic topic, NodeHandle child)
          Informs this client that a child was removed from a topic in which it was interested in.
 void deliver(Topic topic, ScribeContent content)
          This method is invoked when a message is delivered for a topic this client is interested in.
 void subscribeFailed(java.util.Collection<Topic> topics)
          Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.
 void subscribeFailed(Topic topic)
          Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.
 void subscribeSuccess(java.util.Collection<Topic> topics)
          Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScribeImpl.ScribeClientConverter

public ScribeImpl.ScribeClientConverter(ScribeClient client)
Method Detail

subscribeFailed

public void subscribeFailed(java.util.Collection<Topic> topics)
Description copied from interface: ScribeMultiClient
Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.

Specified by:
subscribeFailed in interface ScribeMultiClient

subscribeSuccess

public void subscribeSuccess(java.util.Collection<Topic> topics)
Description copied from interface: ScribeMultiClient
Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.

Specified by:
subscribeSuccess in interface ScribeMultiClient

anycast

public boolean anycast(Topic topic,
                       ScribeContent content)
Description copied from interface: ScribeMultiClient
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.

Specified by:
anycast in interface ScribeClient
Specified by:
anycast in interface ScribeMultiClient
Parameters:
topic - The topic the message was anycasted to
content - The content which was anycasted
Returns:
Whether or not the anycast should continue, true if we will accept the anycast

childAdded

public void childAdded(Topic topic,
                       NodeHandle child)
Description copied from interface: ScribeMultiClient
Informs this client that a child was added to a topic in which it was interested in.

Specified by:
childAdded in interface ScribeClient
Specified by:
childAdded in interface ScribeMultiClient
Parameters:
topic - The topic to unsubscribe from
child - The child that was added

childRemoved

public void childRemoved(Topic topic,
                         NodeHandle child)
Description copied from interface: ScribeMultiClient
Informs this client that a child was removed from a topic in which it was interested in.

Specified by:
childRemoved in interface ScribeClient
Specified by:
childRemoved in interface ScribeMultiClient
Parameters:
topic - The topic to unsubscribe from
child - The child that was removed

deliver

public void deliver(Topic topic,
                    ScribeContent content)
Description copied from interface: ScribeMultiClient
This method is invoked when a message is delivered for a topic this client is interested in.

Specified by:
deliver in interface ScribeClient
Specified by:
deliver in interface ScribeMultiClient
Parameters:
topic - The topic the message was published to
content - The content which was published

subscribeFailed

public void subscribeFailed(Topic topic)
Description copied from interface: ScribeMultiClient
Informs the client that a subscribe on the given topic failed - the client should retry the subscribe or take appropriate action.

Specified by:
subscribeFailed in interface ScribeClient
Specified by:
subscribeFailed in interface ScribeMultiClient
Parameters:
topic - The topic which the subscribe failed on

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection