public final class RegistrationManager extends ExtensionManager
| Modifier and Type | Method and Description |
|---|---|
void |
cancelRegistration()
Cancels a registration.
|
void |
changePassword(String username,
String password)
Changes the password for the current user.
|
Registration |
getRegistration()
Gets the registration data (instructions, fields and form) from the server.
|
boolean |
isRegistrationSupported()
Determines, if in-band registration is supported by the server.
|
void |
register(Registration registration)
Registers a new account.
|
isEnabled, setEnabledpublic boolean isRegistrationSupported()
throws XmppException
StanzaException - If the server returned a stanza error. Common errors are Condition.CONFLICT (username is already in use) or Condition.NOT_ACCEPTABLE (some required information not provided).NoResponseException - If the server did not respond.XmppExceptionpublic Registration getRegistration() throws XmppException
In order to check if a field is required, you should check if a field is not null.
If you are already registered to the server, this method returns your registration data andRegistration.isRegistered() returns true.StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionRegistrationpublic void register(Registration registration) throws XmppException
registration - The registration.StanzaException - If the server returned a stanza error. Common errors are Condition.CONFLICT (username is already in use) or Condition.NOT_ACCEPTABLE (some required information not provided).NoResponseException - If the server did not respond.XmppExceptionpublic void cancelRegistration()
throws XmppException
StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionpublic void changePassword(String username, String password) throws XmppException
username - The user name.password - The password.StanzaException - If the server returned a stanza error.NoResponseException - If the server did not respond.XmppExceptionCopyright © 2014–2015 XMPP.rocks. All rights reserved.