|
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 Module
startApp
in class PeerGroupInterface
arg
- A table of strings arguments.
public void stopApp()
stopApp
in interface Module
stopApp
in class PeerGroupInterface
public Service getInterface()
getInterface
in interface Service
getInterface
in class PeerGroupInterface
public PeerGroup getWeakInterface()
getWeakInterface
in interface PeerGroup
getWeakInterface
in class PeerGroupInterface
public void finalize()
public void unref()
unref
in interface PeerGroup
unref
in class PeerGroupInterface
public Service lookupService(ID name) throws ServiceNotFoundException
lookupService
in interface PeerGroup
lookupService
in class PeerGroupInterface
ServiceNotFoundException
public Service lookupService(ID name, int roleIndex) throws ServiceNotFoundException
lookupService
in interface PeerGroup
lookupService
in class PeerGroupInterface
ServiceNotFoundException
public Iterator getRoleMap(ID name)
getRoleMap
in interface PeerGroup
getRoleMap
in class PeerGroupInterface
public void init(PeerGroup pg, ID assignedID, Advertisement impl)
init
in interface Module
public Advertisement getImplAdvertisement()
getImplAdvertisement
in interface Service
public ThreadGroup getHomeThreadGroup()
getHomeThreadGroup
in interface PeerGroup
public JxtaLoader getLoader()
getLoader
in interface PeerGroup
public boolean isRendezvous()
isRendezvous
in interface PeerGroup
public PeerGroupAdvertisement getPeerGroupAdvertisement()
getPeerGroupAdvertisement
in interface PeerGroup
public PeerAdvertisement getPeerAdvertisement()
getPeerAdvertisement
in interface PeerGroup
public boolean compatible(Element compat)
compatible
in interface PeerGroup
public Module loadModule(ID assignedID, Advertisement impl) throws ProtocolNotSupportedException, PeerGroupException
loadModule
in interface PeerGroup
ProtocolNotSupportedException
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 PeerGroup
IOException
public PeerGroup newGroup(Advertisement pgAdv) throws PeerGroupException
newGroup
in interface PeerGroup
PeerGroupException
public PeerGroup newGroup(PeerGroupID gid, Advertisement impl, String name, String description) throws PeerGroupException
newGroup
in interface PeerGroup
PeerGroupException
public PeerGroup newGroup(PeerGroupID gid) throws PeerGroupException
newGroup
in interface PeerGroup
PeerGroupException
public RendezVousService getRendezVousService()
getRendezVousService
in interface PeerGroup
public EndpointService getEndpointService()
getEndpointService
in interface PeerGroup
public ResolverService getResolverService()
getResolverService
in interface PeerGroup
public DiscoveryService getDiscoveryService()
getDiscoveryService
in interface PeerGroup
public PeerInfoService getPeerInfoService()
getPeerInfoService
in interface PeerGroup
public MembershipService getMembershipService()
getMembershipService
in interface PeerGroup
public PipeService getPipeService()
getPipeService
in interface PeerGroup
public AccessService getAccessService()
getAccessService
in interface PeerGroup
public PeerGroupID getPeerGroupID()
getPeerGroupID
in interface PeerGroup
public PeerID getPeerID()
getPeerID
in interface PeerGroup
public String getPeerGroupName()
getPeerGroupName
in interface PeerGroup
public String getPeerName()
getPeerName
in interface PeerGroup
public ConfigParams getConfigAdvertisement()
getConfigAdvertisement
in interface PeerGroup
public ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() throws Exception
getAllPurposePeerGroupImplAdvertisement
in interface PeerGroup
Exception
public PeerGroup getParentGroup()
getParentGroup
in interface PeerGroup
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |