⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 accountmanager.html

📁 开源项目smack的API文件
💻 HTML
📖 第 1 页 / 共 2 页
字号:
</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="supportsAccountCreation()"><!-- --></A><H3>supportsAccountCreation</H3><PRE>public boolean <B>supportsAccountCreation</B>()</PRE><DL><DD>Returns true if the server supports creating new accounts. Many servers require that you not be currently authenticated when creating new accounts, so the safest behavior is to only create new accounts before having logged in to a server.<P><DD><DL><DT><B>Returns:</B><DD>true if the server support creating new accounts.</DL></DD></DL><HR><A NAME="getAccountAttributes()"><!-- --></A><H3>getAccountAttributes</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&lt;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt; <B>getAccountAttributes</B>()</PRE><DL><DD>Returns an unmodifiable collection of the names of the required account attributes. All attributes must be set when creating new accounts. The standard set of possible attributes are as follows: <ul>      <li>name -- the user's name.      <li>first -- the user's first name.      <li>last -- the user's last name.      <li>email -- the user's email address.      <li>city -- the user's city.      <li>state -- the user's state.      <li>zip -- the user's ZIP code.      <li>phone -- the user's phone number.      <li>url -- the user's website.      <li>date -- the date the registration took place.      <li>misc -- other miscellaneous information to associate with the account.      <li>text -- textual information to associate with the account.      <li>remove -- empty flag to remove account. </ul><p> Typically, servers require no attributes when creating new accounts, or just the user's email address.<P><DD><DL><DT><B>Returns:</B><DD>the required account attributes.</DL></DD></DL><HR><A NAME="getAccountAttribute(java.lang.String)"><!-- --></A><H3>getAccountAttribute</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAccountAttribute</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Returns the value of a given account attribute or <tt>null</tt> if the account attribute wasn't found.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the account attribute to return its value.<DT><B>Returns:</B><DD>the value of the account attribute or <tt>null</tt> if an account attribute wasn't found for the requested name.</DL></DD></DL><HR><A NAME="getAccountInstructions()"><!-- --></A><H3>getAccountInstructions</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAccountInstructions</B>()</PRE><DL><DD>Returns the instructions for creating a new account, or <tt>null</tt> if there are no instructions. If present, instructions should be displayed to the end-user that will complete the registration process.<P><DD><DL><DT><B>Returns:</B><DD>the account creation instructions, or <tt>null</tt> if there are none.</DL></DD></DL><HR><A NAME="createAccount(java.lang.String, java.lang.String)"><!-- --></A><H3>createAccount</H3><PRE>public void <B>createAccount</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;username,                          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;password)                   throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Creates a new account using the specified username and password. The server may require a number of extra account attributes such as an email address and phone number. In that case, Smack will attempt to automatically set all required attributes with blank values, which may or may not be accepted by the server. Therefore, it's recommended to check the required account attributes and to let the end-user populate them with real values instead.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username.<DD><CODE>password</CODE> - the password.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occurs creating the account.</DL></DD></DL><HR><A NAME="createAccount(java.lang.String, java.lang.String, java.util.Map)"><!-- --></A><H3>createAccount</H3><PRE>public void <B>createAccount</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;username,                          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;password,                          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&gt;&nbsp;attributes)                   throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Creates a new account using the specified username, password and account attributes. The attributes Map must contain only String name/value pairs and must also have values for all required attributes.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username.<DD><CODE>password</CODE> - the password.<DD><CODE>attributes</CODE> - the account attributes.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occurs creating the account.<DT><B>See Also:</B><DD><A HREF="../../../org/jivesoftware/smack/AccountManager.html#getAccountAttributes()"><CODE>getAccountAttributes()</CODE></A></DL></DD></DL><HR><A NAME="changePassword(java.lang.String)"><!-- --></A><H3>changePassword</H3><PRE>public void <B>changePassword</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;newPassword)                    throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Changes the password of the currently logged-in account. This operation can only be performed after a successful login operation has been completed. Not all servers support changing passwords; an XMPPException will be thrown when that is the case.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not currently logged-in to the server.<DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occurs when changing the password.</DL></DD></DL><HR><A NAME="deleteAccount()"><!-- --></A><H3>deleteAccount</H3><PRE>public void <B>deleteAccount</B>()                   throws <A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></PRE><DL><DD>Deletes the currently logged-in account from the server. This operation can only be performed after a successful login operation has been completed. Not all servers support deleting accounts; an XMPPException will be thrown when that is the case.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if not currently logged-in to the server.<DD><CODE><A HREF="../../../org/jivesoftware/smack/XMPPException.html" title="class in org.jivesoftware.smack">XMPPException</A></CODE> - if an error occurs when deleting the account.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../org/jivesoftware/smack/Chat.html" title="class in org.jivesoftware.smack"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/jivesoftware/smack/AccountManager.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="AccountManager.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright &copy; 2003-2007 Jive Software. </i></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -