|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.peergroup.PeerGroup.GlobalRegistry
public static class PeerGroup.GlobalRegistry
Global registry of instantiated peer groups. We allow only a single PeerGroup instance for a specific PeerGroupID within the context of the classloader JXTA is loaded into.
Constructor Summary | |
---|---|
PeerGroup.GlobalRegistry()
|
Method Summary | |
---|---|
PeerGroup |
lookupInstance(PeerGroupID gid)
Returns a running instance of the peergroup with given ID if any exists. |
boolean |
registeredInstance(PeerGroupID gid)
Returns true if there is a registered peergroup of the
specified ID. |
boolean |
registerInstance(PeerGroupID gid,
PeerGroup pg)
Registers a new instance. |
boolean |
unRegisterInstance(PeerGroupID gid,
PeerGroup pg)
Unregisters a group instance (normally because the group is being stopped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PeerGroup.GlobalRegistry()
Method Detail |
---|
public boolean registerInstance(PeerGroupID gid, PeerGroup pg)
gid
- the ID of the group of which an instance is being registered.pg
- the group instance being registered.
public boolean unRegisterInstance(PeerGroupID gid, PeerGroup pg)
gid
- the ID of the group of which an instance is unregistered.pg
- the group instance itself (serves as a credential).
public PeerGroup lookupInstance(PeerGroupID gid)
PeerGroup.unref()
ed when it is
no longer needed.
gid
- the id of the group of which an instance is wanted.
null
if no instance exists.public boolean registeredInstance(PeerGroupID gid)
true
if there is a registered peergroup of the
specified ID.
gid
- the id of the group of which an instance is wanted.
true if the peergroup is currently registered
otherwise false;
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |