|
Project JXTA | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.jxta.impl.peergroup.PeerGroupInterface
net.jxta.impl.peergroup.RefCountPeerGroupInterface
RefCountPeerGroupInterface is a PeerGroupInterface object that also serves as a peergroup very-strong reference. When the last such goes away, the peergroup terminates itself despite the existence of aeternal strong references from the various service's threads that would prevent it from ever being finalized. The alternative: to give only weak references to threads seems impractical.
| Nested Class Summary |
| Nested classes inherited from class net.jxta.peergroup.PeerGroup |
PeerGroup.GlobalRegistry |
| Field Summary | |
protected PeerGroup |
groupImpl
The peer group instance which backs this interface object. |
| Fields inherited from interface net.jxta.platform.Module |
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
| Constructor Summary | |
(package private) |
RefCountPeerGroupInterface(GenericPeerGroup theRealThing)
Constructs an interface object that front-ends a given PeerGroup object. |
(package private) |
RefCountPeerGroupInterface(GenericPeerGroup theRealThing,
Map roleMap)
|
| Method Summary | |
boolean |
compatible(Element compat)
|
void |
finalize()
stopApp used to be the standard way of giving up on a group instance, but now that goup instance can be shared, the standard of letting go of a peer group is to stop referencing it. |
AccessService |
getAccessService()
|
ModuleImplAdvertisement |
getAllPurposePeerGroupImplAdvertisement()
|
ConfigParams |
getConfigAdvertisement()
|
DiscoveryService |
getDiscoveryService()
|
EndpointService |
getEndpointService()
|
ThreadGroup |
getHomeThreadGroup()
|
Advertisement |
getImplAdvertisement()
|
Service |
getInterface()
Since THIS is already such an object, it could return itself. |
JxtaLoader |
getLoader()
|
MembershipService |
getMembershipService()
|
PeerGroup |
getParentGroup()
|
PeerAdvertisement |
getPeerAdvertisement()
|
PeerGroupAdvertisement |
getPeerGroupAdvertisement()
|
PeerGroupID |
getPeerGroupID()
|
String |
getPeerGroupName()
|
PeerID |
getPeerID()
|
PeerInfoService |
getPeerInfoService()
|
String |
getPeerName()
|
PipeService |
getPipeService()
|
RendezVousService |
getRendezVousService()
|
ResolverService |
getResolverService()
|
Iterator |
getRoleMap(ID name)
|
PeerGroup |
getWeakInterface()
Returns a weak interface object that refers to this interface object rather than to the group directly. |
void |
init(PeerGroup pg,
ID assignedID,
Advertisement impl)
This is here for class hierarchy reasons. |
boolean |
isRendezvous()
|
Module |
loadModule(ID assignedID,
Advertisement impl)
FIXME: jice@jxta.org 20031103 Idealy, we'd need the groupAPI to offer a means to loadModule() without making a counted reference, so that group services can loadModule() things without preventing group termination. |
Module |
loadModule(ID assignedID,
ModuleSpecID specID,
int where)
|
Service |
lookupService(ID name)
|
Service |
lookupService(ID name,
int roleIndex)
|
PeerGroup |
newGroup(Advertisement pgAdv)
|
PeerGroup |
newGroup(PeerGroupID gid)
|
PeerGroup |
newGroup(PeerGroupID gid,
Advertisement impl,
String name,
String description)
|
void |
publishGroup(String name,
String description)
|
int |
startApp(String[] arg)
Normaly it is ignored. |
void |
stopApp()
This is here for temporary class hierarchy reasons. |
void |
unref()
Can only be called once. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.jxta.peergroup.PeerGroup |
|
| Field Detail |
protected PeerGroup groupImpl
| Constructor Detail |
RefCountPeerGroupInterface(GenericPeerGroup theRealThing)
RefCountPeerGroupInterface(GenericPeerGroup theRealThing,
Map roleMap)
| Method Detail |
public int startApp(String[] arg)
startApp in interface ModulestartApp in class PeerGroupInterfacearg - A table of strings arguments.
public void stopApp()
stopApp in interface ModulestopApp in class PeerGroupInterfacepublic Service getInterface()
getInterface in interface ServicegetInterface in class PeerGroupInterfacepublic PeerGroup getWeakInterface()
getWeakInterface in interface PeerGroupgetWeakInterface in class PeerGroupInterfacepublic void finalize()
public void unref()
unref in interface PeerGroupunref in class PeerGroupInterface
public Service lookupService(ID name)
throws ServiceNotFoundException
lookupService in interface PeerGrouplookupService in class PeerGroupInterfaceServiceNotFoundException
public Service lookupService(ID name,
int roleIndex)
throws ServiceNotFoundException
lookupService in interface PeerGrouplookupService in class PeerGroupInterfaceServiceNotFoundExceptionpublic Iterator getRoleMap(ID name)
getRoleMap in interface PeerGroupgetRoleMap in class PeerGroupInterface
public void init(PeerGroup pg,
ID assignedID,
Advertisement impl)
init in interface Modulepublic Advertisement getImplAdvertisement()
getImplAdvertisement in interface Servicepublic ThreadGroup getHomeThreadGroup()
getHomeThreadGroup in interface PeerGrouppublic JxtaLoader getLoader()
getLoader in interface PeerGrouppublic boolean isRendezvous()
isRendezvous in interface PeerGrouppublic PeerGroupAdvertisement getPeerGroupAdvertisement()
getPeerGroupAdvertisement in interface PeerGrouppublic PeerAdvertisement getPeerAdvertisement()
getPeerAdvertisement in interface PeerGrouppublic boolean compatible(Element compat)
compatible in interface PeerGroup
public Module loadModule(ID assignedID,
Advertisement impl)
throws ProtocolNotSupportedException,
PeerGroupException
loadModule in interface PeerGroupProtocolNotSupportedException
PeerGroupException
public Module loadModule(ID assignedID,
ModuleSpecID specID,
int where)
loadModule in interface PeerGroup
public void publishGroup(String name,
String description)
throws IOException
publishGroup in interface PeerGroupIOException
public PeerGroup newGroup(Advertisement pgAdv)
throws PeerGroupException
newGroup in interface PeerGroupPeerGroupException
public PeerGroup newGroup(PeerGroupID gid,
Advertisement impl,
String name,
String description)
throws PeerGroupException
newGroup in interface PeerGroupPeerGroupException
public PeerGroup newGroup(PeerGroupID gid)
throws PeerGroupException
newGroup in interface PeerGroupPeerGroupExceptionpublic RendezVousService getRendezVousService()
getRendezVousService in interface PeerGrouppublic EndpointService getEndpointService()
getEndpointService in interface PeerGrouppublic ResolverService getResolverService()
getResolverService in interface PeerGrouppublic DiscoveryService getDiscoveryService()
getDiscoveryService in interface PeerGrouppublic PeerInfoService getPeerInfoService()
getPeerInfoService in interface PeerGrouppublic MembershipService getMembershipService()
getMembershipService in interface PeerGrouppublic PipeService getPipeService()
getPipeService in interface PeerGrouppublic AccessService getAccessService()
getAccessService in interface PeerGrouppublic PeerGroupID getPeerGroupID()
getPeerGroupID in interface PeerGrouppublic PeerID getPeerID()
getPeerID in interface PeerGrouppublic String getPeerGroupName()
getPeerGroupName in interface PeerGrouppublic String getPeerName()
getPeerName in interface PeerGrouppublic ConfigParams getConfigAdvertisement()
getConfigAdvertisement in interface PeerGroup
public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement()
throws Exception
getAllPurposePeerGroupImplAdvertisement in interface PeerGroupExceptionpublic PeerGroup getParentGroup()
getParentGroup in interface PeerGroup
|
JXTA J2SE | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||