|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.peergroup.PeerGroupFactory
public final class PeerGroupFactory
A factory for instantiating the JXTA core peer groups and application peer peer groups.
JXTA comes with two peergroup implementations:
PeerGroup
Field Summary | |
---|---|
static Class |
DEFAULT_CONFIGURATOR
Constant for specifying the default configurator. |
static Class |
NULL_CONFIGURATOR
Constant for specifying no configurator. |
Method Summary | |
---|---|
static Class |
getConfiguratorClass()
Get the configurator class for the platform. |
static PeerGroup |
newNetPeerGroup()
Instantiates the platform peergroup and then instantiates the net peer group. |
static PeerGroup |
newNetPeerGroup(PeerGroup ppg)
Instantiates the net peer group using the provided platform peer group. |
static PeerGroup |
newPeerGroup()
Static Method to create a new peer group instance. |
static PeerGroup |
newPlatform()
Instantiates the Platform Peer Group. |
static void |
setConfiguratorClass(Class c)
Set the configurator class for the platform. |
static void |
setNetPGDesc(String desc)
Static Method to initialize the net peer group description. |
static void |
setNetPGID(PeerGroupID id)
Static Method to initialize the net peer group ID. |
static void |
setNetPGName(String name)
Static Method to initialize the net peer group name. |
static void |
setPlatformClass(Class c)
Static Method to initialize the Platform peer group class |
static void |
setStdPeerGroupClass(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 |
Field Detail |
---|
public static final Class NULL_CONFIGURATOR
public static final Class DEFAULT_CONFIGURATOR
Method Detail |
---|
public static void setPlatformClass(Class c)
c
- The Class which will be instantiated for the World Peer Grouppublic static void setStdPeerGroupClass(Class c)
c
- Class to use for for general peer group creation.public static void setNetPGDesc(String desc)
desc
- The description to use for the net peer group.public static void setNetPGName(String name)
name
- The name to use for the net peer group.public static void setNetPGID(PeerGroupID id)
id
- The id to use for the net peer group.public static Class getConfiguratorClass()
public static void setConfiguratorClass(Class c)
c
- Class to use as a configurator.public static PeerGroup newPeerGroup()
public static PeerGroup newPlatform()
Module.init(PeerGroup,ID,Advertisement)
method is
called automatically. The Module.startApp(String[])
method
is left for the invoker to call if appropriate.
Invoking this method amounts to creating an instance of JXTA.
Since JXTA stores its persistent state in the local filesystem
relative to the initial current directory, it is unadvisable to
start more than one instance with the same current directory.
public static PeerGroup newNetPeerGroup(PeerGroup ppg) throws PeerGroupException
ppg
- The platform group.
PeerGroupException
public static PeerGroup newNetPeerGroup() throws PeerGroupException
PeerGroupException
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |