|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.rendezvous.RendezVousServiceImpl
public final class RendezVousServiceImpl
A JXTA RendezvousService
implementation which
implements the standard JXTA Rendezvous Protocol (RVP).
RendezvousService
,
JXTA Protocols Specification : Rendezvous ProtocolField Summary | |
---|---|
EndpointService |
endpoint
|
protected static int |
MAX_MSGIDS
|
PeerView |
rpv
The peer view for this peer group. |
Fields inherited from interface net.jxta.rendezvous.RendezVousService |
---|
DEFAULT_TTL |
Fields inherited from interface net.jxta.platform.Module |
---|
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
Constructor Summary | |
---|---|
RendezVousServiceImpl()
Constructor for the RendezVousServiceImpl object |
Method Summary | |
---|---|
void |
addListener(RendezvousListener listener)
|
boolean |
addMsgId(UUID id)
Checks if a message id has been recorded |
boolean |
addPropagateListener(String name,
EndpointListener listener)
|
boolean |
addPropagateListener(String serviceName,
String serviceParam,
EndpointListener listener)
|
void |
challengeRendezVous(ID peer,
long delay)
|
void |
connectToRendezVous(EndpointAddress addr)
|
void |
connectToRendezVous(PeerAdvertisement adv)
|
UUID |
createMsgId()
|
void |
disconnectFromRendezVous(ID peerId)
|
static RouteAdvertisement |
extractRouteAdv(PeerAdvertisement adv)
|
protected void |
finalize()
|
void |
generateEvent(int type,
ID regarding)
Creates a rendezvous event and sends it to all registered listeners. |
ID |
getAssignedID()
|
Vector |
getConnectedPeerIDs()
|
Enumeration |
getConnectedPeers()
|
Enumeration |
getConnectedRendezVous()
|
Enumeration |
getDisconnectedRendezVous()
|
Advertisement |
getImplAdvertisement()
|
Service |
getInterface()
|
EndpointListener |
getListener(String str)
|
Vector |
getLocalWalkView()
|
(package private) RendezVousServiceProvider |
getRendezvousProvider()
Deprecated. This is private for debugging and diagnostics only. |
RendezVousStatus |
getRendezVousStatus()
|
void |
init(PeerGroup g,
ID assignedID,
Advertisement impl)
Note: it is permissible to pass null as the impl parameter when this instance is not being loaded via the module framework. |
boolean |
isConnectedToRendezVous()
Gets the rendezvousConnected attribute of the RendezVousServiceImpl object |
boolean |
isMsgIdRecorded(UUID id)
|
boolean |
isRendezVous()
|
void |
propagate(Enumeration destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
|
void |
propagate(Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
|
void |
propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl)
|
void |
propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl,
String prunePeer)
|
void |
propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl)
|
void |
propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl,
String prunePeer)
|
boolean |
removeListener(RendezvousListener listener)
|
EndpointListener |
removePropagateListener(String name,
EndpointListener listener)
|
EndpointListener |
removePropagateListener(String serviceName,
String serviceParam,
EndpointListener listener)
|
boolean |
setAutoStart(boolean auto)
(@inheritDoc} |
boolean |
setAutoStart(boolean auto,
long period)
(@inheritDoc} |
int |
startApp(String[] arg)
|
void |
startRendezVous()
|
void |
stopApp()
|
void |
stopRendezVous()
|
void |
walk(Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
|
void |
walk(Vector destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int MAX_MSGIDS
public EndpointService endpoint
public volatile PeerView rpv
Constructor Detail |
---|
public RendezVousServiceImpl()
Method Detail |
---|
public static final RouteAdvertisement extractRouteAdv(PeerAdvertisement adv)
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public Service getInterface()
getInterface
in interface Service
public Advertisement getImplAdvertisement()
getImplAdvertisement
in interface Service
public ID getAssignedID()
public void init(PeerGroup g, ID assignedID, Advertisement impl)
init
in interface Module
public int startApp(String[] arg)
startApp
in interface Module
public void stopApp()
stopApp
in interface Module
public boolean isRendezVous()
isRendezVous
in interface RendezVousService
public RendezVousStatus getRendezVousStatus()
getRendezVousStatus
in interface RendezVousService
public boolean setAutoStart(boolean auto)
setAutoStart
in interface RendezVousService
public boolean setAutoStart(boolean auto, long period)
setAutoStart
in interface RendezVousService
public void connectToRendezVous(PeerAdvertisement adv) throws IOException
connectToRendezVous
in interface RendezVousService
IOException
public void connectToRendezVous(EndpointAddress addr) throws IOException
connectToRendezVous
in interface RendezVousService
IOException
public void challengeRendezVous(ID peer, long delay)
challengeRendezVous
in interface RendezVousService
public void disconnectFromRendezVous(ID peerId)
disconnectFromRendezVous
in interface RendezVousService
public Enumeration getConnectedRendezVous()
getConnectedRendezVous
in interface RendezVousService
public Enumeration getDisconnectedRendezVous()
getDisconnectedRendezVous
in interface RendezVousService
public Enumeration getConnectedPeers()
getConnectedPeers
in interface RendezVousService
public Vector getConnectedPeerIDs()
getConnectedPeerIDs
in interface RendezVousService
public boolean isConnectedToRendezVous()
isConnectedToRendezVous
in interface RendezVousService
public void startRendezVous()
startRendezVous
in interface RendezVousService
public void stopRendezVous()
stopRendezVous
in interface RendezVousService
public boolean addPropagateListener(String name, EndpointListener listener)
addPropagateListener
in interface RendezVousService
public boolean addPropagateListener(String serviceName, String serviceParam, EndpointListener listener)
addPropagateListener
in interface RendezVousService
public EndpointListener getListener(String str)
public EndpointListener removePropagateListener(String name, EndpointListener listener)
removePropagateListener
in interface RendezVousService
public EndpointListener removePropagateListener(String serviceName, String serviceParam, EndpointListener listener)
removePropagateListener
in interface RendezVousService
public void propagate(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException
propagate
in interface RendezVousService
IOException
public void propagate(Enumeration destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException
propagate
in interface RendezVousService
IOException
public void walk(Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException
walk
in interface RendezVousService
IOException
public void walk(Vector destPeerIDs, Message msg, String serviceName, String serviceParam, int defaultTTL) throws IOException
walk
in interface RendezVousService
IOException
public Vector getLocalWalkView()
getLocalWalkView
in interface RendezVousService
public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl, String prunePeer) throws IOException
propagateToNeighbors
in interface RendezVousService
IOException
public void propagateToNeighbors(Message msg, String serviceName, String serviceParam, int ttl) throws IOException
propagateToNeighbors
in interface RendezVousService
IOException
public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl, String prunePeer) throws IOException
propagateInGroup
in interface RendezVousService
IOException
public void propagateInGroup(Message msg, String serviceName, String serviceParam, int ttl) throws IOException
propagateInGroup
in interface RendezVousService
IOException
public final void addListener(RendezvousListener listener)
addListener
in interface RendezVousService
public final boolean removeListener(RendezvousListener listener)
removeListener
in interface RendezVousService
public final void generateEvent(int type, ID regarding)
public boolean isMsgIdRecorded(UUID id)
public boolean addMsgId(UUID id)
id
- message to record.public UUID createMsgId()
RendezVousServiceProvider getRendezvousProvider()
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |