|
|||||||||
| Home >> All >> net >> jxta >> [ peergroup overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
net.jxta.peergroup
Interface PeerGroup

- All Superinterfaces:
- net.jxta.platform.Module, net.jxta.service.Service
- All Known Implementing Classes:
- LightWeightPeerGroup
- public interface PeerGroup
- extends net.jxta.service.Service
Peer groups are formed as a collection of peers that have agreed upon a common set of services. Each peer group is assigned a unique peer group ID and a peer group advertisement. The peer group advertisement contains a ModuleSpecID which refers to a module specification for this peer group.
The peer group specification mandates each of the group services (membership, discovery, resolver, etc). Implementations of that specification are described by ModuleImplAdvertisements which are identified by the group's ModuleSpecID. Implementations are responsible for providing the services mandated by the specification. The java reference implementation achieves this by loading additional Modules which ModuleSpecIDs are listed by the group implementation advertisement.
In order to participate in a group, a peer needs to join the group using the peer group membership service.
JXTA comes with two subclasses of peer groups:
- Platform: this is used to represent the World group. Every peer, when booting, becomes part of this group. This group provides the minimum core services needed to find and instantiate other groups on a peer. Platform has the privilege of assigning a new ID to the peer, if it does not already have one. The World group's ID is invariant.
- StdPeergroup: this is currently used to implement
all other kinds of peer groups.
The first such group that is instantiated after booting is known as
The Net Peer Group. When Platform starts it may
optionaly search for The Net Peer Group on the local network and,
if found, instantiate it. Otherwise a default configuration of
The Net Peer Group is instantiated.
A non-default configuration of The Net Peer Group may be set-up
by the administrator in charge of the network domain inside which the peer
is booting. The Net Peer Group is discovered via the DiscoveryService
protocol. Many such groups may be configured by an administrator.
StdPeergroup may also be used to implement User-defined peer groups: Users can create new peer groups which use their own set of customized services.
| Nested Class Summary | |
static class |
PeerGroup.GlobalRegistry
|
| Field Summary | |
static net.jxta.platform.ModuleClassID |
accessClassID
Well known module class identifier: AccessService |
static net.jxta.platform.ModuleSpecID |
allPurposePeerGroupSpecID
Well known group specification identifier: an all purpose peer group specification. |
static net.jxta.platform.ModuleClassID |
applicationClassID
Well known module class identifier: application |
static int |
Both
Look for needed ModuleImplAdvertisement in both this group and its parent. |
static long |
DEFAULT_EXPIRATION
Default expiration time for discovered group advertisements. |
static long |
DEFAULT_LIFETIME
Default life time for group advertisements in the publisher's cache. |
static net.jxta.platform.ModuleClassID |
discoveryClassID
Well known module class identifier: discovery service |
static net.jxta.platform.ModuleClassID |
endpointClassID
Well known module class identifier: endpoint service |
static int |
FromParent
Look for needed ModuleImplAdvertisement in the parent group of this group. |
static PeerGroup.GlobalRegistry |
globalRegistry
|
static int |
Here
Look for needed ModuleImplAdvertisement in this group. |
static net.jxta.platform.ModuleClassID |
httpProtoClassID
Well known module class identifier: http protocol |
static net.jxta.platform.ModuleClassID |
membershipClassID
Well known module class identifier: membership service |
static net.jxta.platform.ModuleClassID |
peerGroupClassID
Well known module class identifier: peer group |
static net.jxta.platform.ModuleClassID |
peerinfoClassID
Well known module class identifier: peerinfo service |
static net.jxta.platform.ModuleClassID |
pipeClassID
Well known module class identifier: pipe service |
static net.jxta.platform.ModuleClassID |
proxyClassID
Well known module class identifier: ProxyService |
static net.jxta.platform.ModuleSpecID |
refAccessSpecID
Well known access specification identifier: the standard access service |
static net.jxta.platform.ModuleSpecID |
refDiscoverySpecID
Well known service specification identifier: the standard discovery |
static net.jxta.platform.ModuleSpecID |
refEndpointSpecID
Well known service specification identifier: the standard endpoint |
static net.jxta.platform.ModuleSpecID |
refHttpProtoSpecID
Well known endpoint protocol specification identifier: the standard http endpoint protocol |
static net.jxta.platform.ModuleSpecID |
refMembershipSpecID
Well known service specification identifier: the standard membership |
static net.jxta.platform.ModuleSpecID |
refNetPeerGroupSpecID
Well known group specification identifier: the Network Peer Group |
static net.jxta.platform.ModuleSpecID |
refPeerinfoSpecID
Well known service specification identifier: the standard peerinfo |
static net.jxta.platform.ModuleSpecID |
refPipeSpecID
Well known service specification identifier: the standard pipe service |
static net.jxta.platform.ModuleSpecID |
refPlatformSpecID
Well known group specification identifier: the platform |
static net.jxta.platform.ModuleSpecID |
refProxySpecID
Well known application: the Proxy |
static net.jxta.platform.ModuleSpecID |
refRelayProtoSpecID
Well known endpoint protocol specification identifier: the standard relay endpoint protocol |
static net.jxta.platform.ModuleSpecID |
refRendezvousSpecID
Well known service specification identifier: the standard rendezvous |
static net.jxta.platform.ModuleSpecID |
refResolverSpecID
Well known service specification identifier: the standard resolver |
static net.jxta.platform.ModuleSpecID |
refRouterProtoSpecID
Well known endpoint protocol specification identifier: the standard router |
static net.jxta.platform.ModuleSpecID |
refShellSpecID
Well known application: the shell |
static net.jxta.platform.ModuleSpecID |
refStartNetPeerGroupSpecID
Well known main application of the platform: startNetPeerGroup. |
static net.jxta.platform.ModuleSpecID |
refTcpProtoSpecID
Well known endpoint protocol specification identifier: the standard tcp endpoint protocol |
static net.jxta.platform.ModuleSpecID |
refTlsProtoSpecID
Well known endpoint protocol specification identifier: the standard tls endpoint protocol |
static net.jxta.platform.ModuleClassID |
relayProtoClassID
Well known module class identifier: RelayProtocol |
static net.jxta.platform.ModuleClassID |
rendezvousClassID
Well known module class identifier: rendezvous service |
static net.jxta.platform.ModuleClassID |
resolverClassID
Well known module class identifier: resolver service |
static net.jxta.platform.ModuleClassID |
routerProtoClassID
Well known module class identifier: router protocol |
static net.jxta.platform.ModuleClassID |
tcpProtoClassID
Well known module class identifier: tcp protocol |
static net.jxta.platform.ModuleClassID |
tlsProtoClassID
Well known module class identifier: tlsProtocol |
static java.lang.String |
WK_ID_PREFIX
Prefix string for all of the Well Known IDs declated in this interface. |
| Fields inherited from interface net.jxta.platform.Module |
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK |
| Method Summary | |
boolean |
compatible(net.jxta.document.Element compat)
Return true if the provided compatibility statement is compatible with this group. |
net.jxta.access.AccessService |
getAccessService()
Return the Access Service for this Peer Group. |
net.jxta.protocol.ModuleImplAdvertisement |
getAllPurposePeerGroupImplAdvertisement()
Get an all purpose peerGroup ModuleImplAdvertisement that is compatible with this group. |
net.jxta.protocol.ConfigParams |
getConfigAdvertisement()
Returns the config advertisment for this peer in this group (if any). |
net.jxta.discovery.DiscoveryService |
getDiscoveryService()
Return the Discovery Service for this Peer Group. |
net.jxta.endpoint.EndpointService |
getEndpointService()
Return the Endpoint Service for this Peer Group. |
java.lang.ThreadGroup |
getHomeThreadGroup()
Returns the Thread Group in which threads for this peer group will live. |
net.jxta.platform.JxtaLoader |
getLoader()
Returns the class loader for this group. |
net.jxta.membership.MembershipService |
getMembershipService()
Return the Membership Service for this Peer Group. |
PeerGroup |
getParentGroup()
Returns the parent group of this group. |
net.jxta.protocol.PeerAdvertisement |
getPeerAdvertisement()
Return the PeerAdvertisement of the local Peer within this Peer Group. |
net.jxta.protocol.PeerGroupAdvertisement |
getPeerGroupAdvertisement()
Return the PeerGroupAdvertisement for this group. |
PeerGroupID |
getPeerGroupID()
Return the Peer Group ID of this Peer Group. |
java.lang.String |
getPeerGroupName()
Return the Name of this group. |
net.jxta.peer.PeerID |
getPeerID()
Return the Peer ID by which this Peer is known within this Peer Group. |
net.jxta.peer.PeerInfoService |
getPeerInfoService()
Return the PeerInfo Service for this Peer Group. |
java.lang.String |
getPeerName()
Return the name of the local peer within this group. |
net.jxta.pipe.PipeService |
getPipeService()
Return the Pipe Service for this Peer Group. |
net.jxta.rendezvous.RendezVousService |
getRendezVousService()
Return the Rendezvous Service for this Peer Group. |
net.jxta.resolver.ResolverService |
getResolverService()
Return the Resolver Service for this Peer Group. |
java.util.Iterator |
getRoleMap(net.jxta.id.ID name)
Returns the map of the assigned IDs currently associated with the given ModuleClassID by this PeerGroup object. |
PeerGroup |
getWeakInterface()
Returns a weak interface object that represents this group. |
boolean |
isRendezvous()
Returns the whether the group member is a Rendezvous peer for the group. |
net.jxta.platform.Module |
loadModule(net.jxta.id.ID assignedID,
net.jxta.document.Advertisement impl)
Load a module from a ModuleImplAdv. |
net.jxta.platform.Module |
loadModule(net.jxta.id.ID assignedID,
net.jxta.platform.ModuleSpecID specID,
int where)
Load a module from a spec id. |
net.jxta.service.Service |
lookupService(net.jxta.id.ID name)
Lookup for a service by name. |
net.jxta.service.Service |
lookupService(net.jxta.id.ID name,
int roleIndex)
Lookup for a service by class ID and index in a map. |
PeerGroup |
newGroup(net.jxta.document.Advertisement pgAdv)
Instantiate a peer group from its given advertisement. |
PeerGroup |
newGroup(PeerGroupID gid)
Instantiate a group from its Peer Group ID only. |
PeerGroup |
newGroup(PeerGroupID gid,
net.jxta.document.Advertisement impl,
java.lang.String name,
java.lang.String description)
Instantiates a new group from its elementary pieces and publishes the corresponding PeerGroupAdvertisement. |
void |
publishGroup(java.lang.String name,
java.lang.String description)
Publish this group's Peer Group Advertisment if it has not already been published. |
void |
unref()
Explicitly notifies a group interface that it will no-longer be used (similar to dispose). |
| Methods inherited from interface net.jxta.service.Service |
getImplAdvertisement, getInterface |
| Methods inherited from interface net.jxta.platform.Module |
init, startApp, stopApp |
| Field Detail |
Here
public static final int Here
- Look for needed ModuleImplAdvertisement in this group.
- See Also:
- Constant Field Values
FromParent
public static final int FromParent
- Look for needed ModuleImplAdvertisement in the parent group of this group.
- See Also:
- Constant Field Values
Both
public static final int Both
- Look for needed ModuleImplAdvertisement in both this group and its parent.
- See Also:
- Constant Field Values
DEFAULT_LIFETIME
public static final long DEFAULT_LIFETIME
- Default life time for group advertisements in the publisher's cache.
(a year)
- See Also:
- Constant Field Values
DEFAULT_EXPIRATION
public static final long DEFAULT_EXPIRATION
- Default expiration time for discovered group advertisements. (2 weeks)
- See Also:
- Constant Field Values
WK_ID_PREFIX
public static final java.lang.String WK_ID_PREFIX
- Prefix string for all of the Well Known IDs declated in this interface.
- See Also:
- Constant Field Values
peerGroupClassID
public static final net.jxta.platform.ModuleClassID peerGroupClassID
- Well known module class identifier: peer group
resolverClassID
public static final net.jxta.platform.ModuleClassID resolverClassID
- Well known module class identifier: resolver service
discoveryClassID
public static final net.jxta.platform.ModuleClassID discoveryClassID
- Well known module class identifier: discovery service
pipeClassID
public static final net.jxta.platform.ModuleClassID pipeClassID
- Well known module class identifier: pipe service
membershipClassID
public static final net.jxta.platform.ModuleClassID membershipClassID
- Well known module class identifier: membership service
rendezvousClassID
public static final net.jxta.platform.ModuleClassID rendezvousClassID
- Well known module class identifier: rendezvous service
peerinfoClassID
public static final net.jxta.platform.ModuleClassID peerinfoClassID
- Well known module class identifier: peerinfo service
endpointClassID
public static final net.jxta.platform.ModuleClassID endpointClassID
- Well known module class identifier: endpoint service
tcpProtoClassID
public static final net.jxta.platform.ModuleClassID tcpProtoClassID
- Well known module class identifier: tcp protocol
httpProtoClassID
public static final net.jxta.platform.ModuleClassID httpProtoClassID
- Well known module class identifier: http protocol
routerProtoClassID
public static final net.jxta.platform.ModuleClassID routerProtoClassID
- Well known module class identifier: router protocol
applicationClassID
public static final net.jxta.platform.ModuleClassID applicationClassID
- Well known module class identifier: application
tlsProtoClassID
public static final net.jxta.platform.ModuleClassID tlsProtoClassID
- Well known module class identifier: tlsProtocol
proxyClassID
public static final net.jxta.platform.ModuleClassID proxyClassID
- Well known module class identifier: ProxyService
relayProtoClassID
public static final net.jxta.platform.ModuleClassID relayProtoClassID
- Well known module class identifier: RelayProtocol
accessClassID
public static final net.jxta.platform.ModuleClassID accessClassID
- Well known module class identifier: AccessService
refPlatformSpecID
public static final net.jxta.platform.ModuleSpecID refPlatformSpecID
- Well known group specification identifier: the platform
refNetPeerGroupSpecID
public static final net.jxta.platform.ModuleSpecID refNetPeerGroupSpecID
- Well known group specification identifier: the Network Peer Group
refResolverSpecID
public static final net.jxta.platform.ModuleSpecID refResolverSpecID
- Well known service specification identifier: the standard resolver
refDiscoverySpecID
public static final net.jxta.platform.ModuleSpecID refDiscoverySpecID
- Well known service specification identifier: the standard discovery
refPipeSpecID
public static final net.jxta.platform.ModuleSpecID refPipeSpecID
- Well known service specification identifier: the standard pipe service
refMembershipSpecID
public static final net.jxta.platform.ModuleSpecID refMembershipSpecID
- Well known service specification identifier: the standard membership
refRendezvousSpecID
public static final net.jxta.platform.ModuleSpecID refRendezvousSpecID
- Well known service specification identifier: the standard rendezvous
refPeerinfoSpecID
public static final net.jxta.platform.ModuleSpecID refPeerinfoSpecID
- Well known service specification identifier: the standard peerinfo
refEndpointSpecID
public static final net.jxta.platform.ModuleSpecID refEndpointSpecID
- Well known service specification identifier: the standard endpoint
refTcpProtoSpecID
public static final net.jxta.platform.ModuleSpecID refTcpProtoSpecID
- Well known endpoint protocol specification identifier: the standard
tcp endpoint protocol
refHttpProtoSpecID
public static final net.jxta.platform.ModuleSpecID refHttpProtoSpecID
- Well known endpoint protocol specification identifier: the standard
http endpoint protocol
refRouterProtoSpecID
public static final net.jxta.platform.ModuleSpecID refRouterProtoSpecID
- Well known endpoint protocol specification identifier: the standard
router
refTlsProtoSpecID
public static final net.jxta.platform.ModuleSpecID refTlsProtoSpecID
- Well known endpoint protocol specification identifier: the standard
tls endpoint protocol
allPurposePeerGroupSpecID
public static final net.jxta.platform.ModuleSpecID allPurposePeerGroupSpecID
- Well known group specification identifier: an all purpose peer group
specification. The java reference implementation implements it with
the StdPeerGroup class and all the standard platform services and no
endpoint protocols.
refStartNetPeerGroupSpecID
public static final net.jxta.platform.ModuleSpecID refStartNetPeerGroupSpecID
- Well known main application of the platform: startNetPeerGroup.
refShellSpecID
public static final net.jxta.platform.ModuleSpecID refShellSpecID
- Well known application: the shell
refProxySpecID
public static final net.jxta.platform.ModuleSpecID refProxySpecID
- Well known application: the Proxy
refRelayProtoSpecID
public static final net.jxta.platform.ModuleSpecID refRelayProtoSpecID
- Well known endpoint protocol specification identifier: the standard
relay endpoint protocol
refAccessSpecID
public static final net.jxta.platform.ModuleSpecID refAccessSpecID
- Well known access specification identifier: the standard
access service
globalRegistry
public static final PeerGroup.GlobalRegistry globalRegistry
| Method Detail |
getHomeThreadGroup
public java.lang.ThreadGroup getHomeThreadGroup()
- Returns the Thread Group in which threads for this peer group will live.
This is currently used only for debugging purposes so that the source of
a thread can be determined.
getLoader
public net.jxta.platform.JxtaLoader getLoader()
- Returns the class loader for this group.
isRendezvous
public boolean isRendezvous()
- Returns the whether the group member is a Rendezvous peer for the group.
getPeerGroupAdvertisement
public net.jxta.protocol.PeerGroupAdvertisement getPeerGroupAdvertisement()
- Return the PeerGroupAdvertisement for this group.
getPeerAdvertisement
public net.jxta.protocol.PeerAdvertisement getPeerAdvertisement()
- Return the PeerAdvertisement of the local Peer within this Peer Group.
lookupService
public net.jxta.service.Service lookupService(net.jxta.id.ID name) throws net.jxta.exception.ServiceNotFoundException
- Lookup for a service by name.
lookupService
public net.jxta.service.Service lookupService(net.jxta.id.ID name, int roleIndex) throws net.jxta.exception.ServiceNotFoundException
- Lookup for a service by class ID and index in a map.
More than one service in a group may be of a given ModuleClass.
However each of them has a unique assigned ID which serves as the
index in the map of services. In most cases, there is only one
service of each given Module Class, and the ID of that Module Class
is the assigned ID. Otherwise, the group may have a list of existing
assigned ID per base class. This routine may be used to retrieve
services of the given Module Class and index in that list.
In the absence of a mapping, index 0 is still valid and
corresponds to the service which assigned ID is exactly the
given ID.
Group objects with a map are normaly wrappers taylored
specially by the loader of a module (often the group itself) in order
to provide a map appropriate for that module. Modules that do not use
more than one service of a given base class normally never need to call
this method; lookupService(ID) is equivalent to lookupService(ID, 0)
and will transparently remap index 0 to whatever the group's
structure defines as the default for the invoking service.
Note: traditionaly, the given ID is expected to be a base Module
Class ID, and the assigned ID of a Module is a Class ID of the
same base class with a role suffix to make it unique. If the given
ID already contains a role suffix, there may exist an entry for
it in the map anyway, if not (which is the expected use pattern),
then only index 0 exists and the given ID is used whole and
untranslated.
- Since:
- JXTA 2.3.1
getRoleMap
public java.util.Iterator getRoleMap(net.jxta.id.ID name)
- Returns the map of the assigned IDs currently associated with the given
ModuleClassID by this PeerGroup object. The IDs are returned in the order
of their index in the map. So the first ID returned will be identical to
what would be returned by the lookup method for the given ID and index 0.
If there is no explicit such map, this method will return a singleton
containing the given ID as this is the default mapping. There is no
guarantee that any of the returned IDs correspond to an actually
registered service. This method only maps IDs.
- Since:
- JXTA 2.3.1
compatible
public boolean compatible(net.jxta.document.Element compat)
- Return true if the provided compatibility statement is compatible with
this group.
loadModule
public net.jxta.platform.Module loadModule(net.jxta.id.ID assignedID, net.jxta.document.Advertisement impl) throws net.jxta.exception.ProtocolNotSupportedException, net.jxta.exception.PeerGroupException
- Load a module from a ModuleImplAdv.
Compatibility is checked and load is attempted. If compatible and loaded
successfuly, the resulting Module is initialized and returned.
In most cases the other loadModule() method should be preferred, since
unlike this one, it will seek many compatible implementation
advertisements and try them all until one works. The home group of the new
module (its parent group if the new module is a group) will be this group.
loadModule
public net.jxta.platform.Module loadModule(net.jxta.id.ID assignedID, net.jxta.platform.ModuleSpecID specID, int where)
- Load a module from a spec id.
Advertisement is sought, compatibility is checked on all candidates
and load is attempted. The first one that is compatible and loads
successfuly is initialized and returned.
publishGroup
public void publishGroup(java.lang.String name, java.lang.String description) throws java.io.IOException
- Publish this group's Peer Group Advertisment if it has not already been
published. The Peer Group Advertisement is published into the Peer Group
in which this group was instantiated, specifically the Peer Group whose
newGroup()was called. Calling this method is only useful if the group is being created from scratch and the PeerGroup advertisement has not been created beforehand. In such a case, the group has never been named or described. Therefore this information has to be supplied here. If this group has already been previously published, this method does nothing.
newGroup
public PeerGroup newGroup(net.jxta.document.Advertisement pgAdv) throws net.jxta.exception.PeerGroupException
- Instantiate a peer group from its given advertisement. This instantiator
requires that the ModuleImplAdvertisment for the peer group and the
ModuleImplAdvertisements for the group's services be available for
discovery within the current group.
The pgAdv itself may be all new and unpublished. Therefore, the two
typical uses of this routine are:
- Creating an all new group with a new ID while using an existing and published implementation. (Possibly a new one published for that purpose). The information should first be gathered in a new PeerGroupAdvertisement which is then passed to this method.
- Instantiating a group which advertisement has already been discovered (therefore there is no need to find it by groupID again).
newGroup(PeerGroupID,Advertisement,String,String)55
newGroup
public PeerGroup newGroup(PeerGroupID gid, net.jxta.document.Advertisement impl, java.lang.String name, java.lang.String description) throws net.jxta.exception.PeerGroupException
- Instantiates a new group from its elementary pieces
and publishes the corresponding PeerGroupAdvertisement.
The pieces are: the groups implementation adv, the group id,
the name and description.
The typical use of this routine is creating a whole new group based
on a newly created and possibly unpublished implementation adv.
This is a convenience method equivalent to either:
newGrp = thisGroup.loadModule(gid, impl); newGrp.publishGroup(name, description);
or, but only if the implementation advertisement has been published:newPGAdv = AdvertisementFactory.newAdvertisement( PeerGroupAdvertisement.getAdvertisementType()); newPGAdv.setPeerGroupID(gid); newPGAdv.setModuleSpecID(impl.getModuleSpecID()); newPGAdv.setName(name); newPGAdv.setDescription(description); newGrp = thisGroup.newGroup(newPGAdv);
newGroup
public PeerGroup newGroup(PeerGroupID gid) throws net.jxta.exception.PeerGroupException
- Instantiate a group from its Peer Group ID only. Use this when using a
group that has already been published and discovered.
The typical uses of this routine are therefore:
- Instantiating a peer group which is assumed to exist and whose Peer Group ID is already known.
- Creating a new peer group instance using an already published Group advertisement, typically published for that purpose. All other referenced advertisements must also be available.
loadModule(ID,Advertisement)55 or even:grp = new GroupSubClass(); grp.init(parentGroup, gid, impladv);then, REMEMBER TO PUBLISH THE GROUP IF IT IS ALL NEW.
getRendezVousService
public net.jxta.rendezvous.RendezVousService getRendezVousService()
- Return the Rendezvous Service for this Peer Group. This service is
optional and may not be present in all groups.
getEndpointService
public net.jxta.endpoint.EndpointService getEndpointService()
- Return the Endpoint Service for this Peer Group. This service is
present in every Peer Group.
getResolverService
public net.jxta.resolver.ResolverService getResolverService()
- Return the Resolver Service for this Peer Group. This service is
present in every Peer Group.
getDiscoveryService
public net.jxta.discovery.DiscoveryService getDiscoveryService()
- Return the Discovery Service for this Peer Group.
getPeerInfoService
public net.jxta.peer.PeerInfoService getPeerInfoService()
- Return the PeerInfo Service for this Peer Group.
getMembershipService
public net.jxta.membership.MembershipService getMembershipService()
- Return the Membership Service for this Peer Group. This service is
present in every Peer Group.
getPipeService
public net.jxta.pipe.PipeService getPipeService()
- Return the Pipe Service for this Peer Group.
getAccessService
public net.jxta.access.AccessService getAccessService()
- Return the Access Service for this Peer Group. This service is
present in every Peer Group.
- Since:
- JXTA 2.1
getPeerGroupID
public PeerGroupID getPeerGroupID()
- Return the Peer Group ID of this Peer Group.
getPeerID
public net.jxta.peer.PeerID getPeerID()
- Return the Peer ID by which this Peer is known within this Peer Group.
getPeerGroupName
public java.lang.String getPeerGroupName()
- Return the Name of this group. This name is not canonical, meaning that
there may be other groups with the same name.
getPeerName
public java.lang.String getPeerName()
- Return the name of the local peer within this group. This name is not
canonical, meaning that there may be other peers with the same name.
getConfigAdvertisement
public net.jxta.protocol.ConfigParams getConfigAdvertisement()
- Returns the config advertisment for this peer in this group (if any).
getAllPurposePeerGroupImplAdvertisement
public net.jxta.protocol.ModuleImplAdvertisement getAllPurposePeerGroupImplAdvertisement() throws java.lang.Exception
- Get an all purpose peerGroup ModuleImplAdvertisement that is compatible
with this group. This impl adv can be used to create any group that
relies only on the standard services. Or to derive other impl advs, using
this impl advertisement as a basis.
unref
public void unref()
- Explicitly notifies a group interface that it will no-longer be
used (similar to dispose). Does nothing to a real group object,
only has an effect on a group interface.
getWeakInterface
public PeerGroup getWeakInterface()
- Returns a weak interface object that represents this
group.
A weak interface object has no life-cycle privileges over
the group that it represents and therefore its users have
no accountability. A weak interface object is safe to
give away but holds no promise of sustained validity.
Whatever code gave away a weak interface object retains
the power of terminating the group object from which it
was obtained, thereby making the weak interface
object invalid.
A weak interface object is immutable; its unref and stopApp
methods do nothing. Its validity is exactly that of the
group or interface object from which it was obtained.
A weak interface object can be obtained from an interface
object, or from a real group object, or from a weak interface
object. In the later case, the object returned may be
the original weak interface object since such objects
are immutable.
Whatever code obtains a weak interface object from a group object
or regular interface object, remains entirely liable for invoking unref
on the initial object before discarding it. Giving away a weak interface
object is not equivalent to transfering ownerhsip of the original.
- Since:
- JXTA 2.2
getParentGroup
public PeerGroup getParentGroup()
- Returns the parent group of this group. Not all groups have parents and
some implementations may not reveal their parents.
- Since:
- JXTA 2.3
|
|||||||||
| Home >> All >> net >> jxta >> [ peergroup overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC