JXTA

net.jxta.impl.rendezvous.limited
Class LimitedRangeWalk

java.lang.Object
  extended by net.jxta.impl.rendezvous.RdvWalk
      extended by net.jxta.impl.rendezvous.limited.LimitedRangeWalk

public class LimitedRangeWalk
extends RdvWalk

This class is the Limited Walk Policy.

See Also:
LimitedRangeWalker, LimitedRangeGreeter

Field Summary
static String ELEMENTNAME
          The name of the message element in which we will store our information.
static String SERVICENAME
          The prefix we will use for service name we use for messaging.
 
Fields inherited from class net.jxta.impl.rendezvous.RdvWalk
group, listener, srcServiceName, srcServiceParam
 
Constructor Summary
LimitedRangeWalk(PeerGroup group, EndpointListener listener, String srcServiceName, String srcServiceParam, PeerView rpv)
          Standard constructor
 
Method Summary
 LimitedRangeGreeter getGreeter()
          Get/Create a greeter to be used with this walk.
(package private)  PeerView getPeerView()
          Return the Rendezvous peer PeerView used by this walk.
(package private) static LimitedRangeRdvMsg getRdvMessage(Message msg)
          Returns the parsed LimitedRangeRdvMsg from the provided message or null if the message did not contain an appropriate element or the element couldn't be parsed.
 LimitedRangeWalker getWalker()
          Get/Create a walker to be used with this walk.
(package private)  String getWalkServiceName()
          Return the Service Name used by listener of this walk.
(package private)  String getWalkServiceParam()
          Return the Service Param used by listener of this walk.
 void stop()
          Stop the walk.
 
Methods inherited from class net.jxta.impl.rendezvous.RdvWalk
getListener, getPeerGroup, getServiceName, getServiceParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICENAME

public static final String SERVICENAME
The prefix we will use for service name we use for messaging.

See Also:
Constant Field Values

ELEMENTNAME

public static final String ELEMENTNAME
The name of the message element in which we will store our information.

See Also:
Constant Field Values
Constructor Detail

LimitedRangeWalk

public LimitedRangeWalk(PeerGroup group,
                        EndpointListener listener,
                        String srcServiceName,
                        String srcServiceParam,
                        PeerView rpv)
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.
rpv - the rendezvous peer PeerView to be used by this walk.
Method Detail

getRdvMessage

static LimitedRangeRdvMsg getRdvMessage(Message msg)
Returns the parsed LimitedRangeRdvMsg from the provided message or null if the message did not contain an appropriate element or the element couldn't be parsed.

Parameters:
msg - the Message which must contain the LimitedRangeRdvMsg.
Returns:
The LimitedRangeRdvMsg from the message or null.

getPeerView

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

Returns:
The rendezvous peer PeerView used by this walk.

getWalkServiceName

String getWalkServiceName()
Return the Service Name used by listener of this walk.

Returns:
the Service Name used by listener of this walk.

getWalkServiceParam

String getWalkServiceParam()
Return the Service Param used by listener of this walk.

Returns:
the Service Param used by listener of this walk.

getWalker

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

Specified by:
getWalker in class RdvWalk
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 LimitedRangeGreeter getGreeter()
Get/Create a greeter to be used with this walk.

Specified by:
getGreeter in class RdvWalk
Returns:
A greeter to be used with this walk. null is returned if no greeter is available or the walk has been stopped.

stop

public void stop()
Stop the walk.

Specified by:
stop in class RdvWalk

JXSE