Project JXTA

net.jxta.util
Class SimpleRdvMonitor

net.jxta.util.SimpleRdvMonitor
All Implemented Interfaces:
RendezVousMonitor

public class SimpleRdvMonitor
implements RendezVousMonitor

This class implements a very simple RendezVousService Monitor


Inner Class Summary
 class SimpleRdvMonitor.RdV
          Description of the Class
 
Constructor Summary
SimpleRdvMonitor(PeerGroup g, RendezVousService rendezvous)
          Constructor for the SimpleRdvMonitor object
 
Method Summary
 void connected(PeerID peer, long lease)
          This method is called by the RendezVousService service to notify the monitor that a new RendezVousService has accepted the connection.
 void disconnected(PeerID peer)
          This method is called each time a RendezVousService peer is not reachable anymore.
 void discovered(Advertisement adv)
          This method is called by the RendezVousService service in order to provide advertisement about other RendezVousService peers.
 void signal(net.jxta.util.JxtaTimer timer)
          Description of the Method
protected  void startRdv()
           
 

Constructor Detail

SimpleRdvMonitor

public SimpleRdvMonitor(PeerGroup g,
                        RendezVousService rendezvous)
Constructor for the SimpleRdvMonitor object
Parameters:
g - Description of Parameter
rendezvous - Description of Parameter
Method Detail

connected

public void connected(PeerID peer,
                      long lease)
This method is called by the RendezVousService service to notify the monitor that a new RendezVousService has accepted the connection.
Specified by:
connected in interface RendezVousMonitor
Parameters:
peer - is the PeerId of the new connect RendezVousService peer.
lease - is the time in millisecond that the RendezVousService is ready to serve.

disconnected

public void disconnected(PeerID peer)
This method is called each time a RendezVousService peer is not reachable anymore.
Specified by:
disconnected in interface RendezVousMonitor
Parameters:
peer - is the PeerId of the RendezVousService peer.

discovered

public void discovered(Advertisement adv)
This method is called by the RendezVousService service in order to provide advertisement about other RendezVousService peers. This is usefull when a RendezVousService peer wants to balance its load to other RendezVousService
Specified by:
discovered in interface RendezVousMonitor
Parameters:
adv - Description of Parameter

signal

public void signal(net.jxta.util.JxtaTimer timer)
Description of the Method
Parameters:
timer - Description of Parameter

startRdv

protected void startRdv()

Project JXTA