|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.rendezvous.RendezVousServiceProvider
net.jxta.impl.rendezvous.adhoc.AdhocPeerRdvService
public class AdhocPeerRdvService
A JXTA RendezvousService implementation which
implements the ad hoc portion of the standard JXTA Rendezvous Protocol (RVP).
RendezvousService,
JXTA Protocols Specification : Rendezvous Protocol| Field Summary |
|---|
| Fields inherited from class net.jxta.impl.rendezvous.RendezVousServiceProvider |
|---|
closed, group, HEADER_NAME, MAX_TTL, MESSAGE_NAMESPACE_NAME, PropPName, PropSName, rdvService, rendezvousMeter, rendezvousServiceMonitor |
| Constructor Summary | |
|---|---|
AdhocPeerRdvService(PeerGroup g,
RendezVousServiceImpl rdvService)
Constructor |
|
| Method Summary | |
|---|---|
void |
challengeRendezVous(ID peer,
long delay)
Resets the local idea of the lease to the specified value. |
void |
connectToRendezVous(EndpointAddress addr)
|
void |
connectToRendezVous(PeerAdvertisement adv)
|
void |
disconnectFromRendezVous(ID peerId)
Remove a RendezVousService point. |
Vector |
getConnectedPeerIDs()
|
Enumeration |
getConnectedPeers()
|
Enumeration |
getConnectedRendezVous()
Returns an Enumeration of the PeerID all the RendezVous on which this Peer is currentely connected. |
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. |
void |
propagate(Enumeration destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int ttl)
Propagates a message onto as many peers on the local network as possible. |
void |
propagate(Message msg,
String serviceName,
String serviceParam,
int ttl)
Propagates a message onto as many peers on the local network as possible. |
void |
propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl)
|
void |
propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl)
Propagates a message onto as many peers on the local network as possible. |
protected void |
repropagate(Message msg,
RendezVousPropagateMessage propHdr,
String serviceName,
String serviceParam)
|
void |
setChoiceDelay(long delay)
|
protected int |
startApp(String[] arg)
Supply arguments and starts this service if it hadn't started by itself. |
protected void |
stopApp()
Ask this service to stop. |
void |
walk(Message msg,
String serviceName,
String serviceParam,
int ttl)
Walk a message through the rendezvous peers of the network: only rendezvous peers will receive the message. |
void |
walk(Vector destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int ttl)
Walk a message through the rendezvous peers of the network: only rendezvous peers will receive the message. |
| Methods inherited from class net.jxta.impl.rendezvous.RendezVousServiceProvider |
|---|
checkPropHeader, getPeerAdvertisementDoc, getPropHeader, mkAddress, mkAddress, processIncomingMessage, processReceivedMessage, sendToNetwork, setRendezvousServiceMonitor, updatePropHeader |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdhocPeerRdvService(PeerGroup g,
RendezVousServiceImpl rdvService)
g - Description of Parametersadv - Description of Parameter| Method Detail |
|---|
protected int startApp(String[] arg)
startApp in class RendezVousServiceProviderprotected void stopApp()
stopApp in class RendezVousServiceProviderpublic Vector getConnectedPeerIDs()
getConnectedPeerIDs in class RendezVousServiceProviderpublic Enumeration getConnectedPeers()
getConnectedPeers in class RendezVousServiceProviderpublic boolean isConnectedToRendezVous()
isConnectedToRendezVous in class RendezVousServiceProviderpublic Enumeration getConnectedRendezVous()
getConnectedRendezVous in class RendezVousServiceProviderpublic Enumeration getDisconnectedRendezVous()
getDisconnectedRendezVous in class RendezVousServiceProvider
public void connectToRendezVous(PeerAdvertisement adv)
throws IOException
IOException
public void connectToRendezVous(EndpointAddress addr)
throws IOException
IOException
public void challengeRendezVous(ID peer,
long delay)
challengeRendezVous in class RendezVousServiceProviderpeer - The peer to be chanllengeddelay - The delaypublic void disconnectFromRendezVous(ID peerId)
disconnectFromRendezVous in class RendezVousServiceProviderpeerId - the PeerId of the RendezVous to disconnect from.public void setChoiceDelay(long delay)
setChoiceDelay in class RendezVousServiceProvider
public void propagate(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
propagate in class RendezVousServiceProvidermsg - is the message to propagate.serviceName - is the name of the serviceserviceParam - is the parameter of the service
IOException
public void propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
propagateInGroup in class RendezVousServiceProviderIOException
public void propagate(Enumeration destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int ttl)
propagate in class RendezVousServiceProvidermsg - is the message to propagate.serviceName - is the name of the serviceserviceParam - is the parameter of the service
public void propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
propagateToNeighbors in class RendezVousServiceProvidermsg - is the message to propagate.serviceName - is the name of the serviceserviceParam - is the parameter of the service
IOException
public void walk(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
walk in class RendezVousServiceProvidermsg - is the message to walk.serviceName - is the name of the serviceserviceParam - is the parameter of the servicettl - is the maximum TTL of the message (note that the Rendezvous
Service implementation is free to decrease that value.
IOException - when walking the message is impossible (network failure)
public void walk(Vector destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
walk in class RendezVousServiceProviderdestPeerIDs - is a Vector of PeerID of the peers which are receiving
first the walker. Note that each entry in the Vector will create its own
walker.msg - is the message to walk.serviceName - is the name of the serviceserviceParam - is the parameter of the servicettl - is the maximum TTL of the message (note that the Rendezvous
Service implementation is free to decrease that value.
IOException - when walking the message is impossible (network failure)
protected void repropagate(Message msg,
RendezVousPropagateMessage propHdr,
String serviceName,
String serviceParam)
repropagate in class RendezVousServiceProvider
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||