|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.peergroup.PeerGroupFactory
Factory Classes to create a new Peer Platform and New PeerGroups. This class is used by Jxta applications to create new groups
JXTA comes with two subclasses of peer groups:
The Platform group is created via the newPlatform method. The Net Peer Group and user Peer Groups are created via the newPeerGroup method.
PeerGroup
Constructor Summary | |
PeerGroupFactory()
|
Method Summary | |
static PeerGroup |
newNetPeerGroup(PeerGroup pg)
Until the concept of netPeerGroup is better integrated, we need something straightforward so that applications that whish to control the start-up process can easily bring up a netPeerGroup like startNetPeerGroup does. |
static PeerGroup |
newPeerGroup()
Static Method to create a new peer group instance. |
static PeerGroup |
newPeerGroup(PeerGroup parent,
Advertisement adv)
Static Method to create a new PeerGroup instance, given its parameters. |
static PeerGroup |
newPlatform()
Static Method to create a new peer Plaform The init() method is called automatically. |
static void |
setPlatformClass(java.lang.Class c)
Static Method to initialize the Platform peergroup class |
static void |
setStdPeerGroupClass(java.lang.Class c)
Static Method to initialize the std peer group class |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PeerGroupFactory()
Method Detail |
public static void setStdPeerGroupClass(java.lang.Class c)
Class
- name to be initialized in the factorypublic static void setPlatformClass(java.lang.Class c)
Class
- name of the class implementing platformpublic static PeerGroup newPeerGroup()
public static PeerGroup newPeerGroup(PeerGroup parent, Advertisement adv) throws PeerGroupException
public static PeerGroup newPlatform()
public static PeerGroup newNetPeerGroup(PeerGroup pg) throws PeerGroupException
pg
- The platform group.pgId
- The group ID to be assigned. If null, then the default
netPeerGroup is created, with its well known ID, otherwise, the
given one is used. Valid values include "" which causes the platform to
pick an ID itself.sig
- A signature that gets included in the group's advertisement.
If a null gid is provided, then this parameter is ignored and the
signature is always "default".
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |