net.jxta.peergroup
Class PeerGroup.GlobalRegistry
java.lang.Object
net.jxta.peergroup.PeerGroup.GlobalRegistry
- Enclosing interface:
- PeerGroup
public static class PeerGroup.GlobalRegistry
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeerGroup.GlobalRegistry
public PeerGroup.GlobalRegistry()
registerInstance
public boolean registerInstance(PeerGroupID gid,
PeerGroup pg)
- Registers a new instance.
- Parameters:
gid
- the ID of the group of which an instance is being registered.pg
- the group instance being registered.
- Returns:
- false if the instance could not be registered because there
was already such an instance registered.
unRegisterInstance
public boolean unRegisterInstance(PeerGroupID gid,
PeerGroup pg)
- Unregisters a group instance (normaly because the group is being
stopped.
- Parameters:
gid
- the ID of the group of which an instance is unregistered.pg
- the group instance itself (serves as a creadential).
- Returns:
- false if the group could not be unregistered because no such
registration (exact ID, exact object) was not found.
lookupInstance
public PeerGroup lookupInstance(PeerGroupID gid)
- Returns a running instance of the peergroup with given ID if any
exists.
- Parameters:
gid
- the id of the group of which an instance is wanted.
- Returns:
- the group, or null if no instance exists.