|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.impl.rendezvous.RendezVousImpl
This class implements the RendezVous service
Inner Class Summary | |
class |
RendezVousImpl.ClientGC
|
protected class |
RendezVousImpl.PeerConnection
Inner class used to store peers and lease associated to them |
Field Summary | |
static boolean |
debug
|
Constructor Summary | |
RendezVousImpl()
|
Method Summary | |
void |
connectRendezVous(net.jxta.endpoint.EndpointAddress addr)
|
void |
connectRendezVous(net.jxta.protocol.PeerGroupAdvertisement adv)
Add a peer as a new RendezVous point. |
void |
demux(MessageImpl msg)
|
net.jxta.document.Advertisement |
getAdvertisement()
Returns the advertisement for that service. |
java.util.Enumeration |
getConnectedPeers()
Returns an Enumeration of PeerID of the peers that are currentely connected. |
net.jxta.service.Service |
getInterface()
Service objects are not manipulated directly to protect usage of the service. |
void |
init(net.jxta.peergroup.PeerGroup g,
net.jxta.document.Advertisement sadv)
Init routine |
java.util.Enumeration |
listRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected. |
void |
propagateToClients(net.jxta.endpoint.Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
java.lang.String prunePeer)
This API is provided to the Core implementation in order to propagate a message onto all the clients. |
void |
propagateToRendezVous(net.jxta.endpoint.Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
java.lang.String prunePeer)
This API is provided to the Core implementation in order to propagate a message onto all the rendez vous. |
void |
reconnectRendezVous(java.lang.String peer)
|
void |
removeRendezVous(net.jxta.peer.PeerID rdv)
Remove a RendezVous point. |
void |
sendRendezVousAdv(net.jxta.protocol.PeerAdvertisement destPeer,
net.jxta.protocol.PeerAdvertisement rdv)
Sends advertisement about other RendezVous to a given peer |
net.jxta.rendezvous.RendezVousMonitor |
setMonitor(net.jxta.rendezvous.RendezVousMonitor handler)
Register a notification handler that is called each time a RendezVous peer is not reachable anymore. |
int |
startApp(java.lang.String[] arg)
Supply arguments and starts this service if it hadn't started by itself. |
void |
startRendezVous(net.jxta.rendezvous.RendezVousManager handler)
Start the local peer as a RendezVous peer. |
void |
stopApp()
Ask this service to stop. |
void |
stopRendezVous()
Stop the RendezVous function on the local Peer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static boolean debug
Constructor Detail |
public RendezVousImpl()
Method Detail |
public int startApp(java.lang.String[] arg)
arg
- A table of strings arguments.public void stopApp()
public net.jxta.service.Service getInterface()
public net.jxta.document.Advertisement getAdvertisement()
public void init(net.jxta.peergroup.PeerGroup g, net.jxta.document.Advertisement sadv)
myGroup
- The Group associated with this servicepublic void connectRendezVous(net.jxta.protocol.PeerGroupAdvertisement adv) throws java.io.IOException
adv
- the advertisement of the RendezVous peertimeout
- the time to wait to establish the connectionpublic void connectRendezVous(net.jxta.endpoint.EndpointAddress addr) throws java.io.IOException
public void reconnectRendezVous(java.lang.String peer)
public void removeRendezVous(net.jxta.peer.PeerID rdv)
rendezVous
- the PeerId of the RendezVous point to removepublic net.jxta.rendezvous.RendezVousMonitor setMonitor(net.jxta.rendezvous.RendezVousMonitor handler)
handler
- a handler that is called each time a RendezVous peer is
is not reachable anymore.public java.util.Enumeration listRendezVous()
public void sendRendezVousAdv(net.jxta.protocol.PeerAdvertisement destPeer, net.jxta.protocol.PeerAdvertisement rdv)
destPeer
- is the advertisement of the peer to which to
send the RendezVous advertisement.rendezVous
- is the advertisment of a RendezVous peerpublic void startRendezVous(net.jxta.rendezvous.RendezVousManager handler) throws java.io.IOException
handler
- is the RendezVousManager that will be invoked each
time a new Peer request to be connected.public void stopRendezVous()
public java.util.Enumeration getConnectedPeers()
public void demux(MessageImpl msg)
public void propagateToClients(net.jxta.endpoint.Message msg, java.lang.String serviceName, java.lang.String serviceParam, java.lang.String prunePeer)
msg
- is the message to propagate.serviceName
- is the name of the serviceserviceParam
- is the parameter of the serviceprunePeer
- is a peer to prune in the propagation.public void propagateToRendezVous(net.jxta.endpoint.Message msg, java.lang.String serviceName, java.lang.String serviceParam, java.lang.String prunePeer)
msg
- is the message to propagate.serviceName
- is the name of the serviceserviceParam
- is the parameter of the serviceprunePeer
- is a peer to prune in the propagation.
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |