|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.smack.AccountManager
Allows creation and management of accounts on an XMPP server.
XMPPConnection.getAccountManager()
Constructor Summary | |
AccountManager(XMPPConnection connection)
Creates a new AccountManager instance. |
Method Summary | |
void |
changePassword(String newPassword)
Changes the password of the currently logged-in account. |
void |
createAccount(String username,
String password)
Creates a new account using the specified username and password. |
void |
createAccount(String username,
String password,
Map attributes)
Creates a new account using the specified username, password and account attributes. |
void |
deleteAccount()
Deletes the currently logged-in account from the server. |
Iterator |
getAccountAttributes()
Returns an Iterator for the (String) names of the required account attributes. |
String |
getAccountInstructions()
Returns the instructions for creating a new account, or null if there are no instructions. |
boolean |
supportsAccountCreation()
Returns true if the server supports creating new accounts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AccountManager(XMPPConnection connection)
connection
- a connection to a XMPP server.Method Detail |
public boolean supportsAccountCreation()
public Iterator getAccountAttributes()
Typically, servers require no attributes when creating new accounts, or just the user's email address.
public String getAccountInstructions()
public void createAccount(String username, String password) throws XMPPException
username
- the username.password
- the password.
XMPPException
- if an error occurs creating the account.public void createAccount(String username, String password, Map attributes) throws XMPPException
username
- the username.password
- the password.attributes
- the account attributes.
XMPPException
- if an error occurs creating the account.getAccountAttributes()
public void changePassword(String newPassword) throws XMPPException
IllegalStateException
- if not currently logged-in to the server.
XMPPException
- if an error occurs when changing the password.public void deleteAccount() throws XMPPException
IllegalStateException
- if not currently logged-in to the server.
XMPPException
- if an error occurs when deleting the account.
|
Smack | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |