📄 membershipservice.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>MembershipService (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.membership.MembershipService interface"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="MembershipService (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/MembershipService.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/membership/InteractiveAuthenticator.html" title="interface in net.jxta.membership"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="MembershipService.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 | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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.membership</FONT><BR>Interface MembershipService</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A>, <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></DD></DL><DL><DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../net/jxta/impl/membership/NullMembershipService.html" title="class in net.jxta.impl.membership">NullMembershipService</A>, <A HREF="../../../net/jxta/impl/membership/PasswdMembershipService.html" title="class in net.jxta.impl.membership">PasswdMembershipService</A>, <A HREF="../../../net/jxta/impl/membership/pse/PSEMembershipService.html" title="class in net.jxta.impl.membership.pse">PSEMembershipService</A></DD></DL><HR><DL><DT>public interface <B>MembershipService</B><DT>extends <A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></DL><P>The membership service allows a peer to establish an identity within a peer group. Identities are used by services and applications to determine the capabilities available to peers. A peer have any number of identities at one time. Once an identity has been established a credential object is available which allows the peer to prove that it rightfully has that identity. <p/>When a peer group is instantiated on a peer the membership service for that peer group establishes a default temporary identity for the peer within the peergroup. This identity, by convention, only allows the peer to establish their true identity. <p/>The sequence for associating an indentity with a peer within a peer group is as follows: <p/><table> <tr><td valign="top"><b>Apply</b></td> <td>An application or service provides the membership service with an initial credential which may be used by the membership service to determine the method of authentication to be used for establishing the identity. If the membership service implementations allows authentication using the requested mechanism then an <A HREF="../../../net/jxta/membership/Authenticator.html" title="interface in net.jxta.membership"><CODE>Authenticator</CODE></A> object is returned. </td></tr> <tr><td valign="top"><b>Join</b></td> <td>The application or service completes the authenticator. This may involve presenting a user interface, completing challenges, etc. How the authenticator is completed depends on the type of membership service and authenticator in use. <p/>Once completed, the authenticator is returned to the membership service. If the authenticator has been correctly completed, a new credential for the new identity will be available to the peer from the membership service. </td></tr> <tr><td valign="top"><b>Resign</b></td> <td>Whenever the application or service no longer wishes to no longer use the identities it has claimed, it may resign from the peergroup. This will cause any identity credentials held by the membership service to discarded and the list of current identities reverts to contain only the default "nobody" identity.</td></tr> </table> <p/>There is also the question of the duration of validity of the Credential objects returned.<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/credential/AuthenticationCredential.html" title="class in net.jxta.credential"><CODE>AuthenticationCredential</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></TABLE> <A NAME="fields_inherited_from_class_net.jxta.platform.Module"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface net.jxta.platform.<A HREF="../../../net/jxta/platform/Module.html" title="interface in net.jxta.platform">Module</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/platform/Module.html#START_AGAIN_PROGRESS">START_AGAIN_PROGRESS</A>, <A HREF="../../../net/jxta/platform/Module.html#START_AGAIN_STALLED">START_AGAIN_STALLED</A>, <A HREF="../../../net/jxta/platform/Module.html#START_OK">START_OK</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> <A HREF="../../../net/jxta/membership/Authenticator.html" title="interface in net.jxta.membership">Authenticator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#apply(net.jxta.credential.AuthenticationCredential)">apply</A></B>(<A HREF="../../../net/jxta/credential/AuthenticationCredential.html" title="class in net.jxta.credential">AuthenticationCredential</A> application)</CODE><BR> Request the necessary credentials to join the group with which this service is associated.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#getAuthCredentials()">getAuthCredentials</A></B>()</CODE><BR> Returns the current credentials for this peer. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#getCurrentCredentials()">getCurrentCredentials</A></B>()</CODE><BR> Returns the current credentials for this peer. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#getDefaultCredential()">getDefaultCredential</A></B>()</CODE><BR> Returns the default credential for this peer. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#join(net.jxta.membership.Authenticator)">join</A></B>(<A HREF="../../../net/jxta/membership/Authenticator.html" title="interface in net.jxta.membership">Authenticator</A> authenticated)</CODE><BR> Join the group by virtue of the completed authentication provided.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../net/jxta/credential/Credential.html" title="interface in net.jxta.credential">Credential</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#makeCredential(net.jxta.document.Element)">makeCredential</A></B>(<A HREF="../../../net/jxta/document/Element.html" title="interface in net.jxta.document">Element</A> element)</CODE><BR> Given a fragment of a StructuredDocument, reconstruct a Credential object from that fragment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/membership/MembershipService.html#resign()">resign</A></B>()</CODE><BR> Resign all credentials which were previously gained through prior <A HREF="../../../net/jxta/membership/MembershipService.html#join(net.jxta.membership.Authenticator)"><CODE>join()</CODE></A> operations.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.service.Service"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface net.jxta.service.<A HREF="../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../net/jxta/service/Service.html#getImplAdvertisement()">getImplAdvertisement</A>, <A HREF="../../../net/jxta/service/Service.html#getInterface()">getInterface</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_net.jxta.platform.Module"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -