use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class UserService method resetPassword.
public Request resetPassword(ResetPasswordRequest input, AsyncSuccess<ResetPasswordRequest, ResetPasswordResponse> onSuccess, AsyncFailure<ResetPasswordRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodResetPassword, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ResetPasswordResponse outputParameter = new ResetPasswordResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodResetPassword, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
});
onCallStart(UserService.this, UserMethodResetPassword, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class UserService method getEmailAvatar.
public Request getEmailAvatar(GetEmailAvatarRequest input, AsyncSuccess<GetEmailAvatarRequest, GetEmailAvatarResponse> onSuccess, AsyncFailure<GetEmailAvatarRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetEmailAvatar, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetEmailAvatarResponse outputParameter = new GetEmailAvatarResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetEmailAvatar, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetEmailAvatar, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class UserService method followUsers.
public Request followUsers(FollowUsersRequest input, AsyncSuccess<FollowUsersRequest, FollowUsersResponse> onSuccess, AsyncFailure<FollowUsersRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodFollowUsers, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
FollowUsersResponse outputParameter = new FollowUsersResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodFollowUsers, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
});
onCallStart(UserService.this, UserMethodFollowUsers, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class NotificationService method getMetaNotification.
public Request getMetaNotification(GetMetaNotificationRequest input, AsyncSuccess<GetMetaNotificationRequest, GetMetaNotificationResponse> onSuccess, AsyncFailure<GetMetaNotificationRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodGetMetaNotification, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetMetaNotificationResponse outputParameter = new GetMetaNotificationResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodGetMetaNotification, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotification, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotification, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodGetMetaNotification, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotification, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class NotificationService method sendAdhocNotification.
public Request sendAdhocNotification(SendAdhocNotificationRequest input, AsyncSuccess<SendAdhocNotificationRequest, SendAdhocNotificationResponse> onSuccess, AsyncFailure<SendAdhocNotificationRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodSendAdhocNotification, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
SendAdhocNotificationResponse outputParameter = new SendAdhocNotificationResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodSendAdhocNotification, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSendAdhocNotification, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSendAdhocNotification, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodSendAdhocNotification, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSendAdhocNotification, input, exception);
}
return handle;
}
Aggregations