Name

PeerGroupFactory

Synopsis

The newNetPeerGroup( ) method of this class is used to obtain the NetPeerGroup that every peer must join. Calling this method initializes JXTA, including setting the internal classes that are used to instantiate the actual peergroup objects.

If you prefer, you may use the setter methods of this class to provide different implementations of the peergroup objects and use the newPlatform( ) method to initialize JXTA (and the NetPeerGroup).

public class PeerGroupFactory {
// Public Constructors
   public PeerGroupFactory();  
// Public Class Methods
   public static PeerGroup newNetPeerGroup() throws net.jxta.exception.PeerGroupException;
   public static PeerGroup newNetPeerGroup(PeerGroup pg) throws net.jxta.exception.PeerGroupException;
   public static PeerGroup newPeerGroup();  
   public static PeerGroup newPlatform();  
   public static void setPlatformClass(Class c);  
   public static void setStdPeerGroupClass(Class c);  
}

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.