use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class NotificationService method getMetaNotifications.
public Request getMetaNotifications(GetMetaNotificationsRequest input, AsyncSuccess<GetMetaNotificationsRequest, GetMetaNotificationsResponse> onSuccess, AsyncFailure<GetMetaNotificationsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodGetMetaNotifications, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetMetaNotificationsResponse outputParameter = new GetMetaNotificationsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodGetMetaNotifications, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotifications, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotifications, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodGetMetaNotifications, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodGetMetaNotifications, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class NotificationService method setPushToken.
public Request setPushToken(SetPushTokenRequest input, AsyncSuccess<SetPushTokenRequest, SetPushTokenResponse> onSuccess, AsyncFailure<SetPushTokenRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(NotificationMethodSetPushToken, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
SetPushTokenResponse outputParameter = new SetPushTokenResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(NotificationService.this, NotificationMethodSetPushToken, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSetPushToken, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSetPushToken, input, exception);
}
});
onCallStart(NotificationService.this, NotificationMethodSetPushToken, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(NotificationService.this, NotificationMethodSetPushToken, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException 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.RequestException 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.RequestException 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;
}
Aggregations