Project JXTA

net.jxta.impl.membership.passwd
Class PasswdMembershipService.PasswdCredential

java.lang.Object
  extended bynet.jxta.impl.membership.passwd.PasswdMembershipService.PasswdCredential
All Implemented Interfaces:
Credential, CredentialPCLSupport
Enclosing class:
PasswdMembershipService

public static final class PasswdMembershipService.PasswdCredential
extends Object
implements Credential, CredentialPCLSupport

This class provides the sub-class of Credential which is associated with the password membership service.


Field Summary
(package private)  ID peerid
          The peerid associated with this credential.
(package private)  String signedPeerID
          The peerid which has been "signed" so that the identity may be verified.
(package private)  PasswdMembershipService source
          The MembershipService service which generated this credential.
(package private)  boolean valid
          Whether the credential is valid.
(package private)  String whoami
          The identity associated with this credential
 
Constructor Summary
protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source, Element root)
           
protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source, String whoami, String signedPeerID)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a listener
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a listener
 StructuredDocument getDocument(MimeMediaType as)
          
 ID getPeerGroupID()
          
 ID getPeerID()
          
 Service getSourceService()
          
 Object getSubject()
          
protected  boolean handleElement(XMLElement elem)
          Process an individual element from the document.
protected  void initialize(Element root)
          Intialize from a portion of a structured document.
 boolean isExpired()
          

PasswdCredential never expire.

 boolean isValid()
          

PasswdCredential are almost always valid.

 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a listener
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Remove a listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

PasswdMembershipService source
The MembershipService service which generated this credential.


whoami

String whoami
The identity associated with this credential


peerid

ID peerid
The peerid associated with this credential.


signedPeerID

String signedPeerID
The peerid which has been "signed" so that the identity may be verified.


valid

boolean valid
Whether the credential is valid.

Constructor Detail

PasswdMembershipService.PasswdCredential

protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source,
                                                   String whoami,
                                                   String signedPeerID)

PasswdMembershipService.PasswdCredential

protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source,
                                                   Element root)
                                            throws PeerGroupException
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a listener

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

addPropertyChangeListener

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

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

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener

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

removePropertyChangeListener

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

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

getPeerGroupID

public ID getPeerGroupID()

Specified by:
getPeerGroupID in interface Credential

getPeerID

public ID getPeerID()

Specified by:
getPeerID in interface Credential

isExpired

public boolean isExpired()

PasswdCredential never expire.

Specified by:
isExpired in interface Credential

isValid

public boolean isValid()

PasswdCredential are almost always valid.

Specified by:
isValid in interface Credential

getSubject

public Object getSubject()

Specified by:
getSubject in interface Credential

getSourceService

public Service getSourceService()

Specified by:
getSourceService in interface Credential

getDocument

public StructuredDocument getDocument(MimeMediaType as)
                               throws Exception

Specified by:
getDocument in interface Credential
Throws:
Exception

handleElement

protected boolean handleElement(XMLElement elem)
Process an individual element from the document.

Parameters:
elem - the element to be processed.
Returns:
true if the element was recognized, otherwise false.

initialize

protected void initialize(Element root)
Intialize from a portion of a structured document.


JXTA J2SE