|
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 Protocol| Field 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 ObjectThrowablepublic Service getInterface()
getInterface in interface Servicepublic Advertisement getImplAdvertisement()
getImplAdvertisement in interface Servicepublic ID getAssignedID()
public void init(PeerGroup g,
ID assignedID,
Advertisement impl)
init in interface Modulepublic int startApp(String[] arg)
startApp in interface Modulepublic void stopApp()
stopApp in interface Modulepublic boolean isRendezVous()
isRendezVous in interface RendezVousServicepublic RendezVousStatus getRendezVousStatus()
getRendezVousStatus in interface RendezVousServicepublic 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 RendezVousServiceIOException
public void connectToRendezVous(EndpointAddress addr)
throws IOException
connectToRendezVous in interface RendezVousServiceIOException
public void challengeRendezVous(ID peer,
long delay)
challengeRendezVous in interface RendezVousServicepublic void disconnectFromRendezVous(ID peerId)
disconnectFromRendezVous in interface RendezVousServicepublic Enumeration getConnectedRendezVous()
getConnectedRendezVous in interface RendezVousServicepublic Enumeration getDisconnectedRendezVous()
getDisconnectedRendezVous in interface RendezVousServicepublic Enumeration getConnectedPeers()
getConnectedPeers in interface RendezVousServicepublic Vector getConnectedPeerIDs()
getConnectedPeerIDs in interface RendezVousServicepublic boolean isConnectedToRendezVous()
isConnectedToRendezVous in interface RendezVousServicepublic void startRendezVous()
startRendezVous in interface RendezVousServicepublic 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 RendezVousServicepublic 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 RendezVousServiceIOException
public void propagate(Enumeration destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
throws IOException
propagate in interface RendezVousServiceIOException
public void walk(Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
throws IOException
walk in interface RendezVousServiceIOException
public void walk(Vector destPeerIDs,
Message msg,
String serviceName,
String serviceParam,
int defaultTTL)
throws IOException
walk in interface RendezVousServiceIOExceptionpublic Vector getLocalWalkView()
getLocalWalkView in interface RendezVousService
public void propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl,
String prunePeer)
throws IOException
propagateToNeighbors in interface RendezVousServiceIOException
public void propagateToNeighbors(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
propagateToNeighbors in interface RendezVousServiceIOException
public void propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl,
String prunePeer)
throws IOException
propagateInGroup in interface RendezVousServiceIOException
public void propagateInGroup(Message msg,
String serviceName,
String serviceParam,
int ttl)
throws IOException
propagateInGroup in interface RendezVousServiceIOExceptionpublic final void addListener(RendezvousListener listener)
addListener in interface RendezVousServicepublic 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 | |||||||||