public final class RegistrationManager extends Manager
This manager allows to register, cancel an existing registration (i.e. remove an account) or change the password with a host.
Modifier and Type | Method and Description |
---|---|
AsyncResult<java.lang.Void> |
cancelRegistration()
Cancels a registration.
|
AsyncResult<java.lang.Void> |
changePassword(java.lang.String username,
java.lang.String password)
Changes the password for the current user.
|
AsyncResult<Registration> |
getRegistration()
Gets the registration data (instructions, fields and form) from the server.
|
AsyncResult<java.lang.Boolean> |
isRegistrationSupported()
Determines, if in-band registration is supported by the server.
|
AsyncResult<java.lang.Void> |
register(Registration registration)
Registers a new account.
|
isEnabled, setEnabled
public final AsyncResult<java.lang.Boolean> isRegistrationSupported()
Determines, if in-band registration is supported by the server.
public final AsyncResult<Registration> getRegistration()
Gets the registration data (instructions, fields and form) from the server.
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.Registration
public final AsyncResult<java.lang.Void> register(Registration registration)
Registers a new account. Call this method before authenticating.
registration
- The registration.public final AsyncResult<java.lang.Void> cancelRegistration()
Cancels a registration. This method must be called after having authenticated to the server.
public final AsyncResult<java.lang.Void> changePassword(java.lang.String username, java.lang.String password)
Changes the password for the current user. This method must be called after having authenticated to the server.
username
- The user name.password
- The password.Copyright © 2014–2019 XMPP.rocks. All rights reserved.