net.jxta.impl.rendezvous
Class RdvMonitor
java.lang.Object
|
+--net.jxta.impl.rendezvous.RdvMonitor
- public class RdvMonitor
- extends java.lang.Object
- implements net.jxta.rendezvous.RendezVousMonitor, JxtaTimerHandler
This class implements a very simple RendezVous Monitor
Method Summary |
void |
isConnected(net.jxta.peer.PeerID peer,
long lease)
This method is called by the RendezVous service to notify the
monitor that a new RendezVous has accepted the connection. |
void |
lostConnection(net.jxta.peer.PeerID peer)
This method is called each time a RendezVous peer is not
reachable anymore. |
void |
newRendezVous(net.jxta.document.Advertisement adv)
This method is called by the RendezVous service in order
to provide advertisement about other RendezVous peers. |
void |
signal(JxtaTimer timer)
This method is invoked by the timer when it is set off. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
RdvMonitor
public RdvMonitor(net.jxta.peergroup.PeerGroup g,
RendezVousImpl rendezvous)
lostConnection
public void lostConnection(net.jxta.peer.PeerID peer)
- This method is called each time a RendezVous peer is not
reachable anymore.
- Specified by:
- lostConnection in interface net.jxta.rendezvous.RendezVousMonitor
- Parameters:
peer
- is the PeerId of the RendezVous peer.
newRendezVous
public void newRendezVous(net.jxta.document.Advertisement adv)
- This method is called by the RendezVous service in order
to provide advertisement about other RendezVous peers.
This is usefull when a RendezVous peer wants to balance its load
to other RendezVous
- Specified by:
- newRendezVous in interface net.jxta.rendezvous.RendezVousMonitor
isConnected
public void isConnected(net.jxta.peer.PeerID peer,
long lease)
- This method is called by the RendezVous service to notify the
monitor that a new RendezVous has accepted the connection.
- Specified by:
- isConnected in interface net.jxta.rendezvous.RendezVousMonitor
- Parameters:
peer
- is the PeerId of the new connect RendezVous peer.lease
- is the time in millisecond that the RendezVous is
ready to serve.
signal
public void signal(JxtaTimer timer)
- Description copied from interface: JxtaTimerHandler
- This method is invoked by the timer when it is set off.
- Specified by:
- signal in interface JxtaTimerHandler
- Tags copied from interface: JxtaTimerHandler
- Parameters:
timer
- a reference to the timer that has went off.