Name

MembershipService

Synopsis

Concrete instances of this base class provide membership policies. They must define an Authenticator class and return an instance of that class from their apply( ) method, and they must process the Authenticator in the join( ) method, ultimately deciding whether the peer should be allowed to join the peergroup.

Peers can obtain an instance of the membership service from the peergroup class. The resign( ) method is used to leave the group; the makeCredential( ) method contsructs credentials, and the getAuthCredentials( ) method returns the current credentials for this peer in the peergroup.

public abstract class MembershipService implements net.jxta.service.Service {
// Public Constructors
   public MembershipService();  
// Property Accessor Methods (by property name)
   public abstract java.util.Enumeration getAuthCredentials() throws net.jxta.exception.PeerGroupException;
   public abstract java.util.Enumeration getCurrentCredentials() throws net.jxta.exception.PeerGroupException;
   public abstract net.jxta.document.Advertisement getImplAdvertisement(); 
// Implements:Service
   public net.jxta.service.Service getInterface();              
// Implements:Service
   public final String getName();  
// Public Instance Methods
   public abstract net.jxta.membership.Authenticator apply(net.jxta.credential.AuthenticationCredential application) throws net.jxta.exception.PeerGroupException, net.jxta.exception.ProtocolNotSupportedException; public abstract net.jxta.credential.Credential ...

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.