|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface provides an API to the Jxta RendezVous Service.
The RendezVous Service is responsible for propagating message within a JXTA PeerGroup.
While the internal protcol of diffusion is let to the implementation of the service, the JXTA RendezVous Service defines a subscribe mechanism allowing JXTA peers to receive propagated messages (clients of the service) or become a repeater of the service (rendezvous peers). At least one peer in a given PeerGroup must be a rendezvous. However, rendezvous peers can dynamically join or leave the PeerGroup.
When a peers becomes a rendezvous, it publishes a special advertisement, a RdvAdvertisement that can be found by other peers which are looking for a rendezvous in the PeerGroup.
RendezVousManager,
RendezVousMonitor,
RdvAdvertisement,
PeerAdvertisement| Method Summary | |
void |
addListener(RendezvousListener listener)
Add a listener for RenDezVousEvents |
void |
addPropagateListener(java.lang.String name,
EndpointListener listener)
Clients of the rendezvous service can use this to receive raw propagation rather than crawling query/responses. |
void |
connectToRendezVous(EndpointAddress addr)
Add a peer as a new RendezVousService point. |
void |
connectToRendezVous(PeerAdvertisement adv)
Add a peer as a new RendezVousService point. |
void |
disconnectFromRendezVous(ID peerID)
Remove a RendezVousService point. |
java.util.Enumeration |
getConnectedPeers()
Returns an Enumeration of PeerID of the peers that are currentely connected. |
java.util.Enumeration |
getConnectedRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected. |
java.util.Enumeration |
getDisconnectedRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer failed to connect to. |
boolean |
isConnectedToRendezVous()
Return true if connected to a rendezvous. |
boolean |
isRendezVous()
tells whether this rendezvous service currently acts as a "super-node" "rendezvous", knowlege hub, influence broker, or whichever higher status applies to the implementation. |
void |
propagate(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL)
Propagates a message onto as many peers on the local network as possible. |
void |
propagateInGroup(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL,
java.lang.String prunePeer)
Deprecated. |
void |
propagateToNeighbors(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL,
java.lang.String prunePeer)
Deprecated. |
boolean |
removeListener(RendezvousListener listener)
Removes a Listener previously added with addListener. |
void |
removePropagateListener(java.lang.String name,
EndpointListener listener)
Removes a Listener previously added with addPropagateListener. |
void |
sendRendezVousAdv(PeerAdvertisement destPeer,
PeerAdvertisement rendezVous)
Sends advertisement about other RendezVous to a given peer |
RendezVousMonitor |
setMonitor(RendezVousMonitor monitor)
Register a notification monitor that is called each time a RendezVous peer is not reachable anymore. |
void |
startRendezVous()
Start the local peer as a RendezVous peer with the default manager. |
void |
startRendezVous(RendezVousManager monitor)
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 |
getImplAdvertisement, getInterface |
| Methods inherited from interface net.jxta.platform.Module |
init, startApp, stopApp |
| Method Detail |
public void connectToRendezVous(PeerAdvertisement adv)
throws java.io.IOException
adv - the advertisement of the RendezVousService peerjava.io.IOException - when the RendezVousService peer is not reachable
public void connectToRendezVous(EndpointAddress addr)
throws java.io.IOException
addr - EndpointAddress of the rendezvous peerjava.io.IOException - when the RendezVousService peer is not reachablepublic void disconnectFromRendezVous(ID peerID)
peerID - the PeerId of the RendezVous to disconnect from.public RendezVousMonitor setMonitor(RendezVousMonitor monitor)
monitor - a monitor that is called each time a RendezVous peer is
is not reachable anymore.public java.util.Enumeration getConnectedRendezVous()
return Enumeration enumeration of RendezVous
public java.util.Enumeration getDisconnectedRendezVous()
public void startRendezVous(RendezVousManager monitor)
throws java.io.IOException
monitor - is the RendezVousManager that will be invoked each
time a new Peer request to be connected.java.io.IOException - when a monitor has already been connectedpublic void startRendezVous()
public void stopRendezVous()
public java.util.Enumeration getConnectedPeers()
public void sendRendezVousAdv(PeerAdvertisement destPeer,
PeerAdvertisement rendezVous)
destPeer - is the advertisement of the peer to which to
send the RendezVous advertisement.rendezVous - is the advertisment of a RendezVous peer
public void addPropagateListener(java.lang.String name,
EndpointListener listener)
throws java.io.IOException
name - The name of the listener.listener - An EndpointListener to process the message.
public void removePropagateListener(java.lang.String name,
EndpointListener listener)
throws java.io.IOException
name - The name of the listener.listener - An EndpointListener to process the message.public void addListener(RendezvousListener listener)
listener - An RendezvousListener to process the event.public boolean removeListener(RendezvousListener listener)
listener - the RendezvousListener listener remove
public void propagate(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL)
throws java.io.IOException
msg - is the message to propagate.serviceName - is the name of the serviceserviceParam - is the parameter of the service
public void propagateToNeighbors(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL,
java.lang.String prunePeer)
throws java.io.IOException
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.propagate(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int)
public void propagateInGroup(Message msg,
java.lang.String serviceName,
java.lang.String serviceParam,
int defaultTTL,
java.lang.String prunePeer)
throws java.io.IOException
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.propagate(net.jxta.endpoint.Message, java.lang.String, java.lang.String, int)public boolean isConnectedToRendezVous()
public boolean isRendezVous()
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||