Project JXTA

net.jxta.impl.rendezvous.limited
Class LimitedRangeWalker

java.lang.Object
  extended bynet.jxta.impl.rendezvous.limited.LimitedRangeWalker
All Implemented Interfaces:
RdvWalker

public class LimitedRangeWalker
extends Object
implements RdvWalker

The Limited Range Walker is designed to be used by Rendezvous Peer in order to propagate a message among them. A target destination peer is used in order to send the message to a primary peer. Then, depending on the TTL, the message is duplicated into two messages, each of them being sent in each "directions" of the RPV.


Constructor Summary
LimitedRangeWalker(PeerGroup group, LimitedRangeWalk walk)
          Constructor.
 
Method Summary
 void resendMessage(Message msg)
          resend a message to other Rendezvous peers participating into the walk. The provided message is a message that has been received by the Greeter.
 void sendMessage(PeerID destination, Message msg, String srcSvcName, String srcSvcParam, int ttl, RouteAdvertisement srcRouteAdv)
          Send a message to other Rendezvous peers participating into the walk. An initial rendezvous peer is provided, as an hint.
 void stop()
          Stop the walker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedRangeWalker

public LimitedRangeWalker(PeerGroup group,
                          LimitedRangeWalk walk)
Constructor. Instantiates a new LimitedRangeWalk

Parameters:
group - PeerGroup where this Walker is running
walk - parent walk.
Method Detail

stop

public void stop()
Stop the walker

Specified by:
stop in interface RdvWalker

resendMessage

public void resendMessage(Message msg)
                   throws IOException
resend a message to other Rendezvous peers participating into the walk. The provided message is a message that has been received by the Greeter.

Specified by:
resendMessage in interface RdvWalker
Parameters:
msg - the message to be resent.
Throws:
IOException - when the message was not sent to any other rendezvous peers.

sendMessage

public void sendMessage(PeerID destination,
                        Message msg,
                        String srcSvcName,
                        String srcSvcParam,
                        int ttl,
                        RouteAdvertisement srcRouteAdv)
                 throws IOException
Send a message to other Rendezvous peers participating into the walk. An initial rendezvous peer is provided, as an hint.

Specified by:
sendMessage in interface RdvWalker
Parameters:
msg - the message to be sent.
Throws:
IOException - when the message was not sent to any other rendezvous peers.

JXTA J2SE