JXTA

net.jxta.impl.rendezvous
Class RdvWalk

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

public abstract class RdvWalk
extends Object

A Walk implements a particular protocol/behavior policy for sending messages through the Rendezvous Peers. A walk strategy is composed of a Walker and a Greeter. The Walker is used for sending messages according to the strategy. The Greeter receives messages and forwards them to a local listener and may provide the ability to continue a walk.

Each walk is associated with a source service name and service param. These are the name and optional parameter of the service that uses the RdvWalk.

See Also:
RdvWalker, RdvGreeter

Field Summary
protected  PeerGroup group
          Peergroup in which this walk is running.
protected  EndpointListener listener
          Intended recipient of messages received as part of this walk.
protected  String srcServiceName
          Service name used by the (client) of this walk.
protected  String srcServiceParam
          Optional service parameter used by the client of this walk.
 
Constructor Summary
RdvWalk(PeerGroup group, EndpointListener listener, String srcServiceName, String srcServiceParam)
          Standard constructor
 
Method Summary
abstract  RdvGreeter getGreeter()
          Get/Create a greeter to be used with this walk.
 EndpointListener getListener()
          Return the listener associated with this walk
 PeerGroup getPeerGroup()
          Return the Peer Group in which this walk occurs.
 String getServiceName()
          Return the source Service Name for this walk.
 String getServiceParam()
          Return the source Service Param for this walk.
abstract  RdvWalker getWalker()
          Get/Create a walker to be used with this walk.
abstract  void stop()
          Stop the walk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

group

protected final PeerGroup group
Peergroup in which this walk is running.


listener

protected final EndpointListener listener
Intended recipient of messages received as part of this walk.


srcServiceName

protected final String srcServiceName
Service name used by the (client) of this walk.


srcServiceParam

protected final String srcServiceParam
Optional service parameter used by the client of this walk.

Constructor Detail

RdvWalk

public RdvWalk(PeerGroup group,
               EndpointListener listener,
               String srcServiceName,
               String srcServiceParam)
Standard constructor

Parameters:
group - Peergroup in which this walk is running.
listener - Intended recipient of messages received as part of this walk.
srcServiceName - Service name used by the client of this walk.
srcServiceParam - Optional service parameter used by the client of this walk.
Method Detail

stop

public abstract void stop()
Stop the walk.


getWalker

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

Returns:
A walker to be used with this walk. null is returned if no greeter is available or the walk has been stopped.

getGreeter

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

Returns:
A greeter to be used with this walk. null is returned if no greeter is available or the walk has been stopped.

getPeerGroup

public PeerGroup getPeerGroup()
Return the Peer Group in which this walk occurs.

Returns:
the Peer Group in which this walk occurs.

getListener

public EndpointListener getListener()
Return the listener associated with this walk

Returns:
The listener associated with this walk.

getServiceName

public String getServiceName()
Return the source Service Name for this walk.

Returns:
The source Service Name for this walk.

getServiceParam

public String getServiceParam()
Return the source Service Param for this walk.

Returns:
The source Service Param for this walk.

JXSE