|
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.StdRendezVousService
public abstract class StdRendezVousService
Base class for providers which implement the JXTA Standard Rendezvous Protocol.
| Nested Class Summary | |
|---|---|
protected static interface |
StdRendezVousService.StdRdvProtocolListener
Interface for listeners to : |
| Field Summary | |
|---|---|
static String |
ConnectedLeaseReply
|
static String |
ConnectedPeerReply
|
static String |
ConnectedRdvAdvReply
|
static String |
ConnectRequest
|
protected static int |
DEFAULT_MAX_TTL
Default Maximum TTL. |
static String |
DisconnectRequest
|
protected String |
pName
|
protected String |
pParam
|
static String |
RdvAdvReply
|
protected Timer |
timer
|
| 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 | |
|---|---|
protected |
StdRendezVousService(PeerGroup group,
RendezVousServiceImpl rdvService)
Constructor |
| Method Summary | |
|---|---|
abstract PeerConnection |
getPeerConnection(ID id)
Returns the peer connection or null if not present. |
protected abstract PeerConnection[] |
getPeerConnections()
Returns a list of the current peer connections. |
protected void |
processRdvAdvReply(Message msg)
Receive and publish a Rendezvous Peer Advertisement. |
void |
processReceivedMessage(Message message,
RendezVousPropagateMessage propHdr,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
Process a propagated message. |
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 |
propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl)
Propagates a message onto as many peers on the local network as possible. |
protected void |
sendDisconnect(PeerConnection pConn)
Sends a disconnect message to the specified peer. |
protected void |
sendDisconnect(PeerID peerid,
PeerAdvertisement padv)
Sends a disconnect message to the specified peer. |
protected int |
sendToEachConnection(Message msg,
RendezVousPropagateMessage propHdr)
Sends to all connected peers. |
protected int |
startApp(String[] argv,
StdRendezVousService.StdRdvProtocolListener handler)
|
protected void |
stopApp()
Ask this service to stop. |
| Methods inherited from class net.jxta.impl.rendezvous.RendezVousServiceProvider |
|---|
challengeRendezVous, checkPropHeader, disconnectFromRendezVous, getConnectedPeerIDs, getConnectedPeers, getConnectedRendezVous, getDisconnectedRendezVous, getPeerAdvertisementDoc, getPropHeader, isConnectedToRendezVous, mkAddress, mkAddress, processIncomingMessage, propagate, propagateInGroup, repropagate, sendToNetwork, setChoiceDelay, setRendezvousServiceMonitor, startApp, updatePropHeader, walk, walk |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ConnectRequest
public static final String DisconnectRequest
public static final String ConnectedPeerReply
public static final String ConnectedLeaseReply
public static final String ConnectedRdvAdvReply
public static final String RdvAdvReply
protected static final int DEFAULT_MAX_TTL
protected final String pName
protected final String pParam
protected final Timer timer
| Constructor Detail |
|---|
protected StdRendezVousService(PeerGroup group,
RendezVousServiceImpl rdvService)
| Method Detail |
|---|
protected int startApp(String[] argv,
StdRendezVousService.StdRdvProtocolListener handler)
protected void stopApp()
RendezVousServiceProvider
stopApp in class RendezVousServiceProviderprotected void processRdvAdvReply(Message msg)
msg - Message containing the Rendezvous Peer Advertisement
public void processReceivedMessage(Message message,
RendezVousPropagateMessage propHdr,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
processReceivedMessage in class RendezVousServiceProvider
public void propagate(Enumeration destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int ttl)
RendezVousServiceProvider
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
IOExceptionpublic abstract PeerConnection getPeerConnection(ID id)
protected abstract PeerConnection[] getPeerConnections()
protected int sendToEachConnection(Message msg,
RendezVousPropagateMessage propHdr)
msg - is the message to propagate.serviceName - is the name of the serviceserviceParam - is the parameter of the service
protected void sendDisconnect(PeerID peerid,
PeerAdvertisement padv)
id - the peer which we will disconnect from.Messenger - the messenger to use in sending the disconnect.protected void sendDisconnect(PeerConnection pConn)
id - the peer which we will disconnect from.Messenger - the messenger to use in sending the disconnect.
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||