net.jxta.instantp2p
Class PeerGroupManager
java.lang.Object
|
+--net.jxta.instantp2p.PeerGroupManager
- public class PeerGroupManager
- extends java.lang.Object
Method Summary |
void |
checkDiscoverResults(net.jxta.peergroup.PeerGroup group)
check results of discovery request |
net.jxta.protocol.PeerGroupAdvertisement |
createGroup(java.lang.String name)
Creates a new PeerGroup with the given name and Joins the group |
net.jxta.protocol.PeerGroupAdvertisement |
getAdvertisement()
Returns the PeerGroupAdvertisement for this PeerGroupApp |
java.util.Enumeration |
getGroupByName(java.lang.String groupName)
|
java.lang.String |
getGroupName()
Returns the Group name for this PeerGroupApp |
java.util.Enumeration |
getGroups()
|
net.jxta.peergroup.PeerGroup |
getPeerGroup()
Returns the PeerGroup for this PeerGroupApp |
java.util.Enumeration |
getPeers()
|
net.jxta.peergroup.PeerGroup |
getRootPeerGroup()
|
net.jxta.peergroup.PeerGroup |
joinGroup(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
Joins the PeerGroup with the given gid
The group is only joined if the group is in the list and
has not already been joined |
void |
publishGroup(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
|
void |
selectPeer(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
PeerGroupManager
public PeerGroupManager(net.jxta.peergroup.PeerGroup group)
throws net.jxta.exception.PeerGroupException
getPeerGroup
public net.jxta.peergroup.PeerGroup getPeerGroup()
- Returns the PeerGroup for this PeerGroupApp
- Returns:
- the PeerGroup
- Since:
- JXTA 1.0
getRootPeerGroup
public net.jxta.peergroup.PeerGroup getRootPeerGroup()
getAdvertisement
public net.jxta.protocol.PeerGroupAdvertisement getAdvertisement()
- Returns the PeerGroupAdvertisement for this PeerGroupApp
- Returns:
- the PeerGroupAdvertisement
- Since:
- JXTA 1.0
getGroupName
public java.lang.String getGroupName()
- Returns the Group name for this PeerGroupApp
- Returns:
- the name for this group
- Since:
- JXTA 1.0
joinGroup
public net.jxta.peergroup.PeerGroup joinGroup(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
- Joins the PeerGroup with the given gid
The group is only joined if the group is in the list and
has not already been joined
- Parameters:
gid
- Gid of the requested Group to join- Returns:
- the JxtaApp for the joined group
- Since:
- JXTA 1.0
createGroup
public net.jxta.protocol.PeerGroupAdvertisement createGroup(java.lang.String name)
throws net.jxta.exception.PeerGroupException
- Creates a new PeerGroup with the given name and Joins the group
- Parameters:
gid
- Gid of the requested Group to join- Returns:
- the JxtaApp for the new group
- Since:
- JXTA 1.0
checkDiscoverResults
public void checkDiscoverResults(net.jxta.peergroup.PeerGroup group)
- check results of discovery request
- Since:
- JXTA 1.0
getPeers
public java.util.Enumeration getPeers()
getGroups
public java.util.Enumeration getGroups()
selectPeer
public void selectPeer(net.jxta.protocol.PeerGroupAdvertisement pgAdv)
getGroupByName
public java.util.Enumeration getGroupByName(java.lang.String groupName)
publishGroup
public void publishGroup(net.jxta.protocol.PeerGroupAdvertisement pgAdv)