|
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
net.jxta.impl.rendezvous.edge.EdgePeerRdvService
public class EdgePeerRdvService
A JXTA RendezVousService
implementation which
implements the client portion of the standard JXTA Rendezvous Protocol (RVP).
RendezVousService
,
JXTA Protocols Specification : Rendezvous ProtocolNested Class Summary |
---|
Nested classes/interfaces inherited from class net.jxta.impl.rendezvous.StdRendezVousService |
---|
StdRendezVousService.StdRdvProtocolListener |
Field Summary |
---|
Fields inherited from class net.jxta.impl.rendezvous.StdRendezVousService |
---|
ConnectedLeaseReply, ConnectedPeerReply, ConnectedRdvAdvReply, ConnectRequest, DEFAULT_MAX_TTL, DisconnectRequest, pName, pParam, timer |
Fields inherited from class net.jxta.impl.rendezvous.RendezVousServiceProvider |
---|
closed, group, MAX_TTL, PROP_HDR_ELEMENT_NAME, PropPName, PropSName, RDV_MSG_NAMESPACE_NAME, rdvService, rendezvousMeter, rendezvousServiceMonitor |
Constructor Summary | |
---|---|
EdgePeerRdvService(PeerGroup group,
RendezVousServiceImpl rdvService)
Standard Constructor |
Method Summary | |
---|---|
void |
challengeRendezVous(ID peerid,
long delay)
Resets the local idea of the lease to the specified value. |
void |
connectToRendezVous(EndpointAddress addr,
Object hint)
Attempt to connect to the specified rendezvous peer. |
void |
disconnectFromRendezVous(ID peerId)
Remove a RendezVousService point. |
Vector<ID> |
getConnectedPeerIDs()
Returns the peers that are currently connected to this peer. |
PeerConnection |
getPeerConnection(ID peer)
Returns the peer connection or null if not present. |
protected PeerConnection[] |
getPeerConnections()
Returns an array of the current peer connections. |
boolean |
isConnectedToRendezVous()
Return true if connected to a rendezvous. |
void |
propagate(Message msg,
String serviceName,
String serviceParam,
int initialTTL)
Propagates a message onto as many peers on the local network as possible. |
void |
propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int initialTTL)
|
protected int |
startApp(String[] arg)
Supply arguments and starts this service if it hadn't started by itself. |
void |
stopApp()
Ask this service to stop. |
void |
walk(Message msg,
String serviceName,
String serviceParam,
int initialTTL)
Walk a message through the rendezvous peers of the network: only rendezvous peers will receive the message. |
void |
walk(Vector<? extends ID> destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int initialTTL)
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.StdRendezVousService |
---|
processReceivedMessage, propagate, propagateToNeighbors, repropagate, sendDisconnect, sendDisconnect, sendToEachConnection, startApp |
Methods inherited from class net.jxta.impl.rendezvous.RendezVousServiceProvider |
---|
checkPropHeader, getPeerAdvertisementDoc, getPropHeader, mkAddress, mkAddress, processIncomingMessage, sendToNetwork, setRendezvousServiceMonitor, updatePropHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EdgePeerRdvService(PeerGroup group, RendezVousServiceImpl rdvService)
group
- Description of ParameterrdvService
- Description of ParameterMethod Detail |
---|
protected int startApp(String[] arg)
startApp
in class RendezVousServiceProvider
arg
- argument params
public void stopApp()
stopApp
in class StdRendezVousService
public Vector<ID> getConnectedPeerIDs()
getConnectedPeerIDs
in class RendezVousServiceProvider
public boolean isConnectedToRendezVous()
isConnectedToRendezVous
in class RendezVousServiceProvider
public void connectToRendezVous(EndpointAddress addr, Object hint)
connectToRendezVous
in class RendezVousServiceProvider
addr
- The endpoint address of the rendezvous peer.hint
- An optional hint which may be null
.public void challengeRendezVous(ID peerid, long delay)
challengeRendezVous
in class RendezVousServiceProvider
peerid
- The peer to be challengeddelay
- The delaypublic void disconnectFromRendezVous(ID peerId)
disconnectFromRendezVous
in class RendezVousServiceProvider
peerId
- the PeerId of the RendezVous to disconnect from.public void propagate(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException
propagate
in class RendezVousServiceProvider
msg
- is the message to propagate.serviceName
- is the name of the serviceserviceParam
- is the parameter of the serviceinitialTTL
- is the maximum TTL of the message (note that the Rendezvous
Service implementation is free to decrease that value.
IOException
- if an io error occurspublic void propagateInGroup(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException
propagateInGroup
in class RendezVousServiceProvider
IOException
public void walk(Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException
walk
in class RendezVousServiceProvider
msg
- is the message to walk.serviceName
- is the name of the serviceserviceParam
- is the parameter of the serviceinitialTTL
- 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<? extends ID> destPeerIDs, Message msg, String serviceName, String serviceParam, int initialTTL) throws IOException
walk
in class RendezVousServiceProvider
destPeerIDs
- 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 serviceinitialTTL
- 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 PeerConnection getPeerConnection(ID peer)
StdRendezVousService
getPeerConnection
in class StdRendezVousService
peer
- the node ID
protected PeerConnection[] getPeerConnections()
StdRendezVousService
getPeerConnections
in class StdRendezVousService
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |