|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.membership.passwd.PasswdMembershipService.PasswdCredential
public static final class PasswdMembershipService.PasswdCredential
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 |
Fields inherited from interface net.jxta.credential.CredentialPCLSupport |
---|
EXPIRED_CREDENTIAL_PROPERTY, VALID_CREDENTIAL_PROPERTY |
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)
Write credential into a document. |
ID |
getPeerGroupID()
Returns the peerGroupID associated with this credential. |
ID |
getPeerID()
Returns the peerID associated with this credential. |
Service |
getSourceService()
Returns the service which generated this credential. |
Object |
getSubject()
Returns the subject of this credential. |
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()
Returns true if this credential is expired. |
boolean |
isValid()
Returns true if this credential is currently 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 |
---|
PasswdMembershipService source
String whoami
ID peerid
String signedPeerID
boolean valid
Constructor Detail |
---|
protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source, String whoami, String signedPeerID)
protected PasswdMembershipService.PasswdCredential(PasswdMembershipService source, Element root) throws PeerGroupException
PeerGroupException
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface CredentialPCLSupport
listener
- the listenerpublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener
in interface CredentialPCLSupport
propertyName
- the property to watchlistener
- the listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface CredentialPCLSupport
listener
- the listenerpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener
in interface CredentialPCLSupport
propertyName
- the property which was watchedlistener
- the listenerpublic ID getPeerGroupID()
getPeerGroupID
in interface Credential
public ID getPeerID()
getPeerID
in interface Credential
public boolean isExpired()
true
if this credential is expired. Some credential
implementations may never expire.
PasswdCredential never expire.
isExpired
in interface Credential
true
if this credential is expired, otherwise
false
.public boolean isValid()
true
if this credential is currently valid.
PasswdCredential are almost always valid.
isValid
in interface Credential
true
if the credential is currently valid, otherwise
false
.public Object getSubject()
Object.equals(Object)
and Object.hashCode()
.
getSubject
in interface Credential
public Service getSourceService()
getSourceService
in interface Credential
public StructuredDocument getDocument(MimeMediaType as) throws Exception
asMimeType
is a mime
media-type specification and provides the form of the document which is
being requested. Two standard document forms are defined.
"text/plain
" encodes the document in a "pretty-print" format
for human viewing and "text/xml
" which provides an XML format.
Depending on the credential format this document may be
cryptographically signed to prevent alteration.
getDocument
in interface Credential
as
- MimeMediaType format representation requested
Exception
- if an error occursprotected boolean handleElement(XMLElement elem)
elem
- the element to be processed.
protected void initialize(Element root)
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |