Project JXTA

net.jxta.rendezvous
Interface RendezVous


public interface RendezVous
extends Service

This interface provides an API to the Jxta RendezVous mechanism allowing applications to add, remove, monitor RendezVous peers (client side), or control the local peer, if it is a RendezVous itself.

Any peer in a peer group can become a rendezvous for a peer group. A rendezvous provides a long-range discovery mechanism where members of a peer group can find themselves. Rendezvous are advertised as part of the peer group advertisement of a peer group.

Since:
JXTA 1.0
See Also:
RendezVousManager, RendezVousMonitor, Discovery, PeerGroupAdvertisement

Method Summary
 void connectRendezVous(EndpointAddress addr)
          Add a peer as a new RendezVous point.
 void connectRendezVous(PeerGroupAdvertisement adv)
          Add a peer as a new RendezVous point.
 java.util.Enumeration getConnectedPeers()
          Returns an Enumeration of PeerID of the peers that are currentely connected.
 java.util.Enumeration listRemovedRendezVous()
          Returns an Enumeration of the PeerID all the RendezVous on which this Peer failed to connect to.
 java.util.Enumeration listRendezVous()
          Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected.
 void removeRendezVous(PeerID rendezVous)
          Remove a RendezVous point.
 void sendRendezVousAdv(PeerAdvertisement destPeer, PeerAdvertisement rendezVous)
          Sends advertisement about other RendezVous to a given peer
 RendezVousMonitor setMonitor(RendezVousMonitor handler)
          Register a notification handler that is called each time a RendezVous peer is not reachable anymore.
 void startRendezVous(RendezVousManager handler)
          Start the local peer as a RendezVous peer.
 void stopRendezVous()
          Stop the RendezVous function on the local Peer.
 
Methods inherited from interface net.jxta.service.Service
getAdvertisement, getInterface
 
Methods inherited from interface net.jxta.platform.Application
init, startApp, stopApp
 

Method Detail

connectRendezVous

public void connectRendezVous(PeerGroupAdvertisement adv)
                       throws java.io.IOException
Add a peer as a new RendezVous point. If/When the RendezVous accepts the connection, the RendezVous service will invoke the RendezVousMonitor.
Parameters:
adv - the advertisement of the RendezVous peer
Throws:
java.io.IOException - when the RendezVous peer is not reachable
Since:
JXTA 1.0

connectRendezVous

public void connectRendezVous(EndpointAddress addr)
                       throws java.io.IOException
Add a peer as a new RendezVous point. If/When the RendezVous accepts the connection, the RendezVous service will invoke the RendezVousMonitor.
Parameters:
addr - EndpointAddress of the rendezvous peer
Throws:
java.io.IOException - when the RendezVous peer is not reachable
Since:
JXTA 1.0

removeRendezVous

public void removeRendezVous(PeerID rendezVous)
Remove a RendezVous point.
Parameters:
rendezVous - the PeerId of the RendezVous point to remove
Since:
JXTA 1.0

setMonitor

public RendezVousMonitor setMonitor(RendezVousMonitor handler)
Register a notification handler that is called each time a RendezVous peer is not reachable anymore.
Parameters:
handler - a handler that is called each time a RendezVous peer is is not reachable anymore.
Returns:
RendezVousMonitor returns, if any, the current RendezVousMonitor
Since:
JXTA 1.0

listRendezVous

public java.util.Enumeration listRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected.
Returns:
Enumeration enumeration of RendezVous
Since:
JXTA 1.0

listRemovedRendezVous

public java.util.Enumeration listRemovedRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer failed to connect to.
Returns:
Enumeration enumeration of RendezVous
Since:
JXTA 1.0

startRendezVous

public void startRendezVous(RendezVousManager handler)
                     throws java.io.IOException
Start the local peer as a RendezVous peer. The caller must provide a handler to an authorization manager.
Parameters:
handler - is the RendezVousManager that will be invoked each time a new Peer request to be connected.
Throws:
java.io.IOException - when a handler has already been connected
Since:
JXTA 1.0

stopRendezVous

public void stopRendezVous()
Stop the RendezVous function on the local Peer. All connected Peer are disconnected.
Since:
JXTA 1.0

getConnectedPeers

public java.util.Enumeration getConnectedPeers()
Returns an Enumeration of PeerID of the peers that are currentely connected.
Returns:
Enumeration enumeration of peers connected to that rendezvous
Since:
JXTA 1.0

sendRendezVousAdv

public void sendRendezVousAdv(PeerAdvertisement destPeer,
                              PeerAdvertisement rendezVous)
Sends advertisement about other RendezVous to a given peer
Parameters:
destPeer - is the advertisement of the peer to which to send the RendezVous advertisement.
rendezVous - is the advertisment of a RendezVous peer
Since:
JXTA 1.0

Project JXTA