|
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
class 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/interfaces inherited from interface net.jxta.peergroup.PeerGroup |
---|
PeerGroup.GlobalRegistry |
Field Summary |
---|
Fields inherited from class net.jxta.impl.peergroup.PeerGroupInterface |
---|
groupImpl |
Fields inherited from interface net.jxta.platform.Module |
---|
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
Constructor Summary | |
---|---|
RefCountPeerGroupInterface(GenericPeerGroup theRealThing)
Constructs an interface object that front-ends a given PeerGroup object. |
|
RefCountPeerGroupInterface(GenericPeerGroup theRealThing,
Map roleMap)
|
Method Summary | |
---|---|
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. |
Service |
getInterface()
Since THIS is already such an object, it could return itself. |
Iterator |
getRoleMap(ID name)
|
PeerGroup |
getWeakInterface()
Returns a weak interface object that refers to this interface object rather than to the group directly. |
Service |
lookupService(ID name)
|
Service |
lookupService(ID name,
int roleIndex)
|
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 |
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()
finalize
in class Object
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
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |