📄 psecredential.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>PSECredential (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.impl.membership.pse.PSECredential class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="PSECredential (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PSECredential.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/jxta/impl/membership/pse/PSEConfig.html" title="class in net.jxta.impl.membership.pse"><B>PREV CLASS</B></A> <A HREF="../../../../../net/jxta/impl/membership/pse/PSEDefs.html" title="class in net.jxta.impl.membership.pse"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="PSECredential.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">net.jxta.impl.membership.pse</FONT><BR>Class PSECredential</H2><PRE>java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.impl.membership.pse.PSECredential</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></DD></DL><HR><DL><DT>public final class <B>PSECredential</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></DL><P>This class provides the sub-class of Credential which is associated with the PSE membership service. <p/>There are two varients of the credential: <ul> <li>local - Generated as a result of local login. This type of credential can be used for signing and can be serialized for inclusion in protocols.</li> <li>remote - Generated as a result of deserialization from protocols. The credential is verified to ensure that the contents are valid at the time it is created.</li> </ul> <p/>The schema for this credential format: <pre><code> <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" /> <!-- A SHA1WithRSA Signature --> <xs:element name="Signature" type="xs:string" /> </xs:sequence> </xs:complexType> </code></pre><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential"><CODE>Credential</CODE></A>, <A HREF="../../../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse"><CODE>PSEMembershipService</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) java.security.cert.X509Certificate</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#cert">cert</A></B></CODE><BR> The identity associated with this credential</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) <A HREF="../../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#peerid">peerid</A></B></CODE><BR> The peerid associated with this credential.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) java.security.PrivateKey</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#privateKey">privateKey</A></B></CODE><BR> The private key associated with this credential. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) <A HREF="../../../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#source">source</A></B></CODE><BR> The MembershipService service which generated this credential. </TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#PSECredential(net.jxta.impl.membership.pse.PSEMembershipService, net.jxta.document.Element)">PSECredential</A></B>(<A HREF="../../../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A> source, <A HREF="../../../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> root)</CODE><BR> Create a new remote credential. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#PSECredential(net.jxta.impl.membership.pse.PSEMembershipService, java.security.cert.X509Certificate, java.security.PrivateKey)">PSECredential</A></B>(<A HREF="../../../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A> source, java.security.cert.X509Certificate cert, java.security.PrivateKey privateKey)</CODE><BR> Create a new local credential. </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.security.cert.Certificate</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getCertificate()">getCertificate</A></B>()</CODE><BR> Returns the certificate associated with this credential.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getDocument(net.jxta.document.MimeMediaType)">getDocument</A></B>(<A HREF="../../../../../net/jxta/document/MimeMediaType.html" title="class in net.jxta.document">MimeMediaType</A> as)</CODE><BR> Write credential into a document. <code>asMimeType</code> is a mime media-type specification and provides the form of the document which is being requested. Two standard document forms are defined. <code>"text/plain"</code> encodes the document in a "pretty-print" format for human viewing and <code>"text/xml"<code> which provides an XML format. <p/>Depending on the credential format this document may be cryptographically signed to prevent alteration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getPeerGroupID()">getPeerGroupID</A></B>()</CODE><BR> Returns the peerGroupID associated with this credential</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getPeerID()">getPeerID</A></B>()</CODE><BR> Returns the peerID associated with this credential</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.security.PrivateKey</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getPrivateKey()">getPrivateKey</A></B>()</CODE><BR> Returns the private key associated with this credential. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getSourceService()">getSourceService</A></B>()</CODE><BR> Returns the service which generated this credential.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#getSubject()">getSubject</A></B>()</CODE><BR> Returns the subject of this credential. The Objects returned <b>must</b> support <CODE>Object.equals(Object)</CODE> and <CODE>Object.hashCode()</CODE>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#handleElement(net.jxta.document.XMLElement)">handleElement</A></B>(<A HREF="../../../../../net/jxta/document/XMLElement.html" title="interface in net.jxta.document">XMLElement</A> elem)</CODE><BR> Process an individual element from the document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#initialize(net.jxta.document.Element)">initialize</A></B>(<A HREF="../../../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> root)</CODE><BR> Intialize from a portion of a structured document.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#isExpired()">isExpired</A></B>()</CODE><BR> If true then the credential is expired. Some credential implementations may never epxire. <p/>A PSE Credential is valid as long as the associated certificate is valid.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/membership/pse/PSECredential.html#isValid()">isValid</A></B>()</CODE><BR> Returns true if this credential is currently valid. <p/>A PSE Credential is valid as long as the associated certificate is valid.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="source"><!-- --></A><H3>source</H3><PRE><A HREF="../../../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A> <B>source</B></PRE><DL><DD>The MembershipService service which generated this credential. XXX 20030609 bondolo@jxta.org Perhaps this should be a weak reference.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -