|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.membership.pse.PSECredential
public final class PSECredential
This class provides the sub-class of Credential which is associated with the PSE membership service.
There are two varients of the credential:
<xs:element name="PSECred" type="jxta:PSECred" />
<xs:complexType name="PSECred">
<xs:sequence>
<xs:element name="PeerGroupID" type="jxta:JXTAID" />
<xs:element name="PeerID" type="jxta:JXTAID" />
<!-- An X.509 Certificate -->
<xs:element name="Certificate" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
<!-- A SHA1WithRSA Signature -->
<xs:element name="Signature" type="xs:string" />
</xs:sequence>
</xs:complexType>
</code>
Credential,
PSEMembershipService| Constructor Summary | |
|---|---|
|
PSECredential(Element root)
Create a new remote credential. |
|
PSECredential(PSEMembershipService source,
Element root)
Create a new remote credential. |
protected |
PSECredential(PSEMembershipService source,
ID keyID,
CertPath certChain,
PrivateKey privateKey)
Create a new local credential. |
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a listener |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a listener |
boolean |
equals(Object target)
|
protected void |
finalize()
|
X509Certificate |
getCertificate()
Returns the certificate associated with this credential. |
X509Certificate[] |
getCertificateChain()
Returns the certificate chain associated with this credential. |
StructuredDocument |
getDocument(MimeMediaType encodeAs)
|
ID |
getKeyID()
Returns the key id associated with this credential, if any. |
ID |
getPeerGroupID()
|
ID |
getPeerID()
|
PrivateKey |
getPrivateKey()
Deprecated. Use <@link #getSigner(String)> or <@link #getSignatureVerifier(String)> instead. |
Signature |
getSignatureVerifier(String algorithm)
Get a Signature verifier object based upon the certificate associated with this credential. |
Signature |
getSigner(String algorithm)
Get a Signature object based upon the private key associated with this credential. |
Service |
getSourceService()
|
Object |
getSubject()
|
protected boolean |
handleElement(XMLElement elem)
Process an individual element from the document. |
int |
hashCode()
|
protected void |
initialize(Element root)
Intialize from a portion of a structured document. |
boolean |
isExpired()
A PSE Credential is valid as long as the associated certificate is valid. |
boolean |
isValid()
A PSE Credential is valid as long as the associated certificate is valid and as long as the membership service still has the credential. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a listener |
(package private) void |
setValid(boolean valid)
A PSE Credential is valid as long as the associated certificate is valid. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected PSECredential(PSEMembershipService source,
ID keyID,
CertPath certChain,
PrivateKey privateKey)
throws IOException
IOExceptionpublic PSECredential(Element root)
public PSECredential(PSEMembershipService source,
Element root)
| Method Detail |
|---|
public boolean equals(Object target)
equals in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface CredentialPCLSupportlistener - the listener
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
addPropertyChangeListener in interface CredentialPCLSupportpropertyName - the property to watchlistener - the listenerpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface CredentialPCLSupportlistener - the listener
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
removePropertyChangeListener in interface CredentialPCLSupportpropertyName - the property which was watchedlistener - the listenerpublic ID getPeerGroupID()
getPeerGroupID in interface Credentialpublic ID getPeerID()
getPeerID in interface Credentialpublic boolean isExpired()
isExpired in interface Credentialpublic boolean isValid()
isValid in interface Credentialvoid setValid(boolean valid)
public Object getSubject()
getSubject in interface Credentialpublic Service getSourceService()
getSourceService in interface Credential
public StructuredDocument getDocument(MimeMediaType encodeAs)
throws Exception
getDocument in interface CredentialExceptionpublic X509Certificate getCertificate()
public X509Certificate[] getCertificateChain()
public PrivateKey getPrivateKey()
public ID getKeyID()
public Signature getSigner(String algorithm)
throws NoSuchAlgorithmException
algorithm - the signing algorithm to use.
NoSuchAlgorithmException
public Signature getSignatureVerifier(String algorithm)
throws NoSuchAlgorithmException
algorithm - the signing algorithm to use.
NoSuchAlgorithmExceptionprotected boolean handleElement(XMLElement elem)
elem - the element to be processed.
protected void initialize(Element root)
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||