JXTA

net.jxta.impl.rendezvous.limited
Class LimitedRangeGreeter

java.lang.Object
  extended by net.jxta.impl.rendezvous.limited.LimitedRangeGreeter
All Implemented Interfaces:
EndpointListener, RdvGreeter

public class LimitedRangeGreeter
extends Object
implements EndpointListener, RdvGreeter

The limited range rendezvous peer greeter.

See Also:
RdvGreeter, RdvWalk, RdvWalker, LimitedRangeRdvMsg

Constructor Summary
LimitedRangeGreeter(LimitedRangeWalk walk)
          Constructor
 
Method Summary
 void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr)
          This method is invoked by the EndpointService for each incoming message which is addressed to this listener.
 void replyMessage(Message msg, Message reply)
          Reply to a message received by the Greeter.
 void stop()
          Stop the greeter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedRangeGreeter

public LimitedRangeGreeter(LimitedRangeWalk walk)
Constructor

Parameters:
walk - The walk we will be associated with.
Method Detail

stop

public void stop()
Stop the greeter

Specified by:
stop in interface RdvGreeter

processIncomingMessage

public void processIncomingMessage(Message message,
                                   EndpointAddress srcAddr,
                                   EndpointAddress dstAddr)
This method is invoked by the EndpointService for each incoming message which is addressed to this listener.

Listens on "LR-Greeter"<groupid>/<walkSvc><walkParam>

Currently, all this method has to do, is to invoke the upper layer.

Specified by:
processIncomingMessage in interface EndpointListener
Parameters:
message - Incoming message
srcAddr - Endpoint Address of the source of the message.
dstAddr - Endpoint Address of the destination of the message.

replyMessage

public void replyMessage(Message msg,
                         Message reply)
                  throws IOException
Reply to a message received by the Greeter.

Specified by:
replyMessage in interface RdvGreeter
Parameters:
msg - The source message received previously by the Greeter
reply - The reply message to be sent to the source of the message.
Throws:
IOException - when the reply cannot be sent.

JXSE