use of com.willshex.blogwt.shared.api.user.call.ForgotPasswordResponse in project blogwt by billy1380.
the class UserService method forgotPassword.
public Request forgotPassword(ForgotPasswordRequest input, AsyncSuccess<ForgotPasswordRequest, ForgotPasswordResponse> onSuccess, AsyncFailure<ForgotPasswordRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodForgotPassword, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ForgotPasswordResponse outputParameter = new ForgotPasswordResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodForgotPassword, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
});
onCallStart(UserService.this, UserMethodForgotPassword, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodForgotPassword, input, exception);
}
return handle;
}
Aggregations