Name
Package net.jxta.peergroup
Synopsis
Peergroups serve a number of purposes in JXTA. All peers belong to at least one peergroup (the NetPeerGroup); they are encouraged to discover (or create) and join other peergroups. Peergroups also scope JXTA operations: discovery of peers, pipes, or other services occurs only within the context of a given peergroup. Therefore, two peers that wish to communicate must join the same peergroup. Peergroups may optionally enforce membership restrictions and other security features.
Peergroups are self-organizing: any peer can create a new peergroup by creating the appropriate peergroup advertisement and publishing it. From a programming perspective, the peergroup object is created by taking a peergroup advertisement (whether created or discovered by the peer) and using it to initialize the peergroup object. Peergroups are named, which is how peers usually discover peergroups that they want to join.
Peergroups are created by providing
the appropriate peer advertisement to the
PeerGroupFactory class. The class hierarchy for
this package is shown in Figure 9-11.

Figure 9-11. The net.jxta.peergroup package
Interfaces
public interface
PeerGroup extends net.jxta.service.Service; |
Classes
public static class
PeerGroup.IdMaker; |
public class
PeerGroupFactory; |
public abstract class
PeerGroupID extends net.jxta.id.ID; |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access