Project JXTA

net.jxta.impl.rendezvous
Class RdvWalk

java.lang.Object
  extended bynet.jxta.impl.rendezvous.RdvWalk
Direct Known Subclasses:
LimitedRangeWalk

public abstract class RdvWalk
extends Object

This abstract class must be extended by all rendezvous peer walking policies. A Walk policy implements a particular protocol/behavior for sending messages through the Rendezvous Peers. A rendezvous peer is responsible for instantiating a RdvWalk object, and starting a Greeter. Other peers, that want to send messages using a walk, are reponsible for instantiating a RdvWalk object, and getting a walker. Each walk is associated to a service name and a service param. Those are the name and optional parameter are those of the service that uses the RdvWalk.

See Also:
LimitedRangeWalk

Field Summary
protected  PeerGroup group
           
protected  PeerView rpv
           
protected  String serviceName
           
protected  String serviceParam
           
 
Constructor Summary
RdvWalk(PeerGroup group, String serviceName, String serviceParam, PeerView rpv)
          Standard constructor
 
Method Summary
protected  void finalize()
          
 RdvGreeter getGreeter()
          Get/Create a greeter to be used with this walk.
 PeerView getPeerView()
          Return the Rendezvous peer PeerView used by this walk.
 String getServiceName()
          Return the Service Name associated with this walk
 String getServiceParam()
          Return the Service Param associated with this walk
 RdvWalker getWalker()
          Get/Create a walker to be used with this walk.
 void stop()
          Stop this walk.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rpv

protected PeerView rpv

group

protected PeerGroup group

serviceName

protected final String serviceName

serviceParam

protected final String serviceParam
Constructor Detail

RdvWalk

public RdvWalk(PeerGroup group,
               String serviceName,
               String serviceParam,
               PeerView rpv)
Standard constructor

Parameters:
group - peergroup in which this walk is running
serviceName - name used by the service (client) of this walk.
serviceParam - optional parameter used by the service (client) of this walk.
rpv - the rendezvous peer PeerView to be used by this walk.
Method Detail

getWalker

public RdvWalker getWalker()
Get/Create a walker to be used with this walk.

Returns:
RdvWalker a walker to be used with this walk. null is returned if no walker can be used.

getGreeter

public RdvGreeter getGreeter()
Get/Create a greeter to be used with this walk.

Returns:
RdvGreeter a greeter to be used with this walk. null is returned if no greeter can be used.

getPeerView

public PeerView getPeerView()
Return the Rendezvous peer PeerView used by this walk.

Returns:
PeerView the rendezvous peer PeerView used by this walk.

getServiceName

public String getServiceName()
Return the Service Name associated with this walk

Returns:
String the Service Name associated with this walk

getServiceParam

public String getServiceParam()
Return the Service Param associated with this walk

Returns:
String the Service Param associated with this walk

stop

public void stop()
Stop this walk.


finalize

protected void finalize()
                 throws Throwable

Throws:
Throwable

JXTA J2SE