|
Project JXTA | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Configurator | A configurator is responsible for the persistence and validation of configuration parameters. |
PeerGroup | Peer groups are formed as a collection of peers that have agreed upon a common set of services. |
Class Summary | |
---|---|
LightWeightPeerGroup | LightWeightPeerGroup is a class intended to help building PeerGroup that can inherit one or more services from a parent PeerGroup. |
PeerGroup.GlobalRegistry | |
PeerGroupFactory | A factory for instantiating the JXTA core peer groups and application peer peer groups. |
PeerGroupID | This class implements a PeerGroup ID. |
Peer groups are formed as a collection of peers that have agreed upon a common set of services.
An object that implements thePeerGroup
interface, presents the
API of
those services and encapsulate the group's identity and the local peer's
identity in that group.
A group is instantiated on a peer by instantiating the group class
specified by the group definition and initializing the resulting object
with the parameters specified by the group definition.
A group may be and often is defined and instantiated within the context
of another group referred to as its parent group. In that case an
appropriate
and initialized PeerGroup
object, that represents that group may
be obtained
from the parent group by using one of the parent's
newGroup
methods.
All peers start with instantiating one well known root group
(which has no parent) known as the World Peer Group. An object
representing this group, often referred to as the Platform,
may be obtained from the PeerGroupFactory
by invoking the method
PeerGroupFactory.newPlatform()
.
The World Peer Group has a limited set of functionality. Most peers chose to
instantiate early on another well known group known as the Net Peer Group
and to use it as the root of the other groups they create.
An object representing the Net Peer Group may be obtained from the
PeerGroupFactory
by invoking the method PeerGroupFactory.newNetPeerGroup()
. This
method invokes PeerGroupFactory.newPlatform()
automatically, so
if an application wants to use the Net Peer Group as its root group,
invoking PeerGroupFactory.newNetPeerGroup()
is all that is
required.
All other groups should be created or instantiated within the context
of already instantiated groups by using one of the
newGroup
methods.
It is possible to change the identity, name, and description of the
group that PeerGroupFactory.newNetPeerGroup()
instantiates by
setting the following properties in the file config.properties
(all three
must be specified for the setting to take effect):
NetPeerGroupID
NetPeerGroupName
NetPeerGroupDesc
PeerGroupFactory
static methods:
PeerGroupFactory.setNetPGID(net.jxta.peergroup.PeerGroupID)
PeerGroupFactory.setNetPGName(java.lang.String)
PeerGroupFactory.setNetPGDesc(java.lang.String)
newGroup
methods of the resulting
Platform object.
An example to that end is included in the JXTA platform documentation:
Dual Infrastructure Group Tutorial
PeerGroup
,
PeerGroupFactory
,
PeerGroupAdvertisement
,
PeerAdvertisement
,
ID
,
JXTA Protocols Specification : Peer Groups
|
JXTA J2SE | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |