Project JXTA

net.jxta.impl.membership.none
Class NoneMembershipService

java.lang.Object
  extended by net.jxta.impl.membership.none.NoneMembershipService
All Implemented Interfaces:
MembershipService, Module, Service

public class NoneMembershipService
extends Object
implements MembershipService

A Membership Service implementation which is intended to be used with peer groups which require no real authentication.

The none service allows you to claim any identity within the peergroup, but for peergroups which use this Membership Service method, it is likely that the identity is used only for informational purposes.

A default credential with the name "nobody" is automatically available without requiring authentication by this service.


Nested Class Summary
static class NoneMembershipService.NoneAuthenticator
          Authenticator Class for the None Membership Service.
 
Field Summary
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
NoneMembershipService()
          default constructor.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a listener
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a listener
 Authenticator apply(AuthenticationCredential application)
          
 Enumeration getAuthCredentials()
          
 Enumeration getCurrentCredentials()
          
 Credential getDefaultCredential()
          
 Advertisement getImplAdvertisement()
          
 Service getInterface()
          
 void init(PeerGroup group, ID assignedID, Advertisement impl)
          
 Credential join(Authenticator authenticated)
          
 Credential makeCredential(Element element)
          
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a listener
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a listener
 void resign()
          
 int startApp(String[] arg)
          
 void stopApp()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoneMembershipService

public NoneMembershipService()
                      throws PeerGroupException
default constructor. Normally called only by the peer group.

Throws:
PeerGroupException
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a listener

Specified by:
addPropertyChangeListener in interface MembershipService
Parameters:
listener - the listener

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a listener

Specified by:
addPropertyChangeListener in interface MembershipService
Parameters:
propertyName - the property to watch
listener - the listener

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener

Specified by:
removePropertyChangeListener in interface MembershipService
Parameters:
listener - the listener

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Remove a listener

Specified by:
removePropertyChangeListener in interface MembershipService
Parameters:
propertyName - the property which was watched
listener - the listener

init

public void init(PeerGroup group,
                 ID assignedID,
                 Advertisement impl)
          throws PeerGroupException

Specified by:
init in interface Module
Throws:
PeerGroupException

getInterface

public Service getInterface()

Specified by:
getInterface in interface Service

startApp

public int startApp(String[] arg)

Specified by:
startApp in interface Module

stopApp

public void stopApp()

Specified by:
stopApp in interface Module

getImplAdvertisement

public Advertisement getImplAdvertisement()

Specified by:
getImplAdvertisement in interface Service

apply

public Authenticator apply(AuthenticationCredential application)
                    throws PeerGroupException,
                           ProtocolNotSupportedException

Specified by:
apply in interface MembershipService
Throws:
PeerGroupException
ProtocolNotSupportedException

getDefaultCredential

public Credential getDefaultCredential()

Specified by:
getDefaultCredential in interface MembershipService

getCurrentCredentials

public Enumeration getCurrentCredentials()

Specified by:
getCurrentCredentials in interface MembershipService

getAuthCredentials

public Enumeration getAuthCredentials()

Specified by:
getAuthCredentials in interface MembershipService

join

public Credential join(Authenticator authenticated)
                throws PeerGroupException

Specified by:
join in interface MembershipService
Throws:
PeerGroupException

resign

public void resign()

Specified by:
resign in interface MembershipService

makeCredential

public Credential makeCredential(Element element)
                          throws PeerGroupException,
                                 Exception

Specified by:
makeCredential in interface MembershipService
Throws:
PeerGroupException
Exception

JXTA J2SE