Project JXTA

net.jxta.impl.rendezvous.limited
Class LimitedRangeGreeter

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

public class LimitedRangeGreeter
extends RdvGreeter
implements EndpointListener

The limited range rendezvous peer greeter.


Field Summary
static String ServiceName
           
 
Constructor Summary
LimitedRangeGreeter(PeerGroup group, RdvWalk walk)
           
 
Method Summary
 void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr)
          This is the EndpointListener incoming message method.
 void replyMessage(Message msg, Message reply)
          Reply to a message received by the Greeter.
 void start()
          Start the greeter
 void stop()
          Stop the greeter
 
Methods inherited from class net.jxta.impl.rendezvous.RdvGreeter
getEndpointListener, setEndpointListener
 
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
See Also:
Constant Field Values
Constructor Detail

LimitedRangeGreeter

public LimitedRangeGreeter(PeerGroup group,
                           RdvWalk walk)
Method Detail

start

public void start()
Start the greeter

Specified by:
start in class RdvGreeter

stop

public void stop()
Stop the greeter

Overrides:
stop in class RdvGreeter

processIncomingMessage

public void processIncomingMessage(Message message,
                                   EndpointAddress srcAddr,
                                   EndpointAddress dstAddr)
This is the EndpointListener incoming message method. Currentely, all this method has to do, is to recover the upper layer Service listener, and invoke it. This is the place where flow control mechanism (denying requests when the system is overloaded) should be implemented.

Specified by:
processIncomingMessage in interface EndpointListener

replyMessage

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

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

JXTA J2SE