Project JXTA

net.jxta.peergroup
Interface PeerGroup

All Superinterfaces:
Application

public interface PeerGroup
extends Application

This interface implements the peer group interface. 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 defines each of the group services (membership, discovery, resolver, etc).

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:

Since:
JXTA 1.0
See Also:
PeerGroupID, Service, PeerGroupFactory, PeerGroupAdvertisement

Method Summary
 PeerGroupAdvertisement getAdvertisement()
          Ask a group for its group advertisement
 Application getApp()
          Return the default application setup for this peergroup The application can be started via its init() method, or by calling this group's startApp() method.
 boolean getDebug()
          Check debug status
 Discovery getDiscovery()
           
 PeerGroupID getID()
          Ask a group its group id.
 Membership getMembership()
           
 PeerID getPeerID()
          Ask a group member for its peer Id.
 PeerInfo getPeerInfo()
           
 java.lang.String getPeerName()
          Ask a group member for its peer Name.
 Pipe getPipe()
           
 RendezVous getRendezVous()
           
 Resolver getResolver()
           
 boolean isRendezvous()
          Returns the whether the group member is a Rendezvous peer for the group
 Service lookupService(java.lang.String name)
          Lookup for a service by name.
 
Methods inherited from interface net.jxta.platform.Application
init, startApp, stopApp
 

Method Detail

getResolver

public Resolver getResolver()
Returns:
Resolver an object implementing the Resolver service for this group.

getDiscovery

public Discovery getDiscovery()
Returns:
Discovery an object implementing the Discovery service for this group.

getPeerInfo

public PeerInfo getPeerInfo()
Returns:
PeerInfo an object implementing the PeerInfo service for this group.

getMembership

public Membership getMembership()
Returns:
Membership an object implementing the Membership service for this group.

getPipe

public Pipe getPipe()
Returns:
Pipe an object implementing the Pipe service for this group.

getRendezVous

public RendezVous getRendezVous()
Returns:
RendezVous an object implementing the RendezVous service for this group.

getDebug

public boolean getDebug()
Check debug status
Returns:
boolean true if debug is on.
Since:
JUXTA 1.0

isRendezvous

public boolean isRendezvous()
Returns the whether the group member is a Rendezvous peer for the group
Returns:
boolean true if the peer is a rendezvous for the group.
Since:
JUXTA 1.0

getID

public PeerGroupID getID()
Ask a group its group id.
Returns:
PeerGroupId this Group's ID
Since:
JUXTA 1.0

getPeerID

public PeerID getPeerID()
Ask a group member for its peer Id.
Returns:
PeerId this peer's ID
Since:
JUXTA 1.0

getPeerName

public java.lang.String getPeerName()
Ask a group member for its peer Name.
Returns:
String this peer's name
Since:
JUXTA 1.0

getAdvertisement

public PeerGroupAdvertisement getAdvertisement()
Ask a group for its group advertisement
Returns:
PeerGroupAdvertisement this Group's advertisement
Since:
JUXTA 1.0

lookupService

public Service lookupService(java.lang.String name)
                      throws ServiceNotFoundException
Lookup for a service by name.
Parameters:
name - the service name
Returns:
Service, the Service registered by that name
Throws:
ServiceNotFoundException - could not find the service requested
Since:
JUXTA 1.0

getApp

public Application getApp()
Return the default application setup for this peergroup The application can be started via its init() method, or by calling this group's startApp() method.
Returns:
Application The application object
Since:
JUXTA 1.0

Project JXTA