use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class NotificationService method updateMetaNotification.
public Request updateMetaNotification(UpdateMetaNotificationRequest input, AsyncSuccess<UpdateMetaNotificationRequest, UpdateMetaNotificationResponse> onSuccess, AsyncFailure<UpdateMetaNotificationRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodUpdateMetaNotification, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
UpdateMetaNotificationResponse outputParameter = new UpdateMetaNotificationResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodUpdateMetaNotification, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodUpdateMetaNotification, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodUpdateMetaNotification, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodUpdateMetaNotification, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodUpdateMetaNotification, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class NotificationService method getNotifications.
public Request getNotifications(GetNotificationsRequest input, AsyncSuccess<GetNotificationsRequest, GetNotificationsResponse> onSuccess, AsyncFailure<GetNotificationsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodGetNotifications, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetNotificationsResponse outputParameter = new GetNotificationsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodGetNotifications, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotifications, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotifications, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodGetNotifications, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotifications, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class NotificationService method getNotificationSettings.
public Request getNotificationSettings(GetNotificationSettingsRequest input, AsyncSuccess<GetNotificationSettingsRequest, GetNotificationSettingsResponse> onSuccess, AsyncFailure<GetNotificationSettingsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodGetNotificationSettings, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetNotificationSettingsResponse outputParameter = new GetNotificationSettingsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodGetNotificationSettings, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotificationSettings, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotificationSettings, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodGetNotificationSettings, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetNotificationSettings, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method getUserDetails.
public Request getUserDetails(GetUserDetailsRequest input, AsyncSuccess<GetUserDetailsRequest, GetUserDetailsResponse> onSuccess, AsyncFailure<GetUserDetailsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetUserDetails, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetUserDetailsResponse outputParameter = new GetUserDetailsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetUserDetails, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetUserDetails, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetUserDetails, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method checkUsername.
public Request checkUsername(CheckUsernameRequest input, AsyncSuccess<CheckUsernameRequest, CheckUsernameResponse> onSuccess, AsyncFailure<CheckUsernameRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodCheckUsername, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
CheckUsernameResponse outputParameter = new CheckUsernameResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodCheckUsername, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
});
onCallStart(UserService.this, UserMethodCheckUsername, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodCheckUsername, input, exception);
}
return handle;
}
Aggregations