use of com.google.gwt.json.client.JSONException 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;
}
use of com.google.gwt.json.client.JSONException 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.json.client.JSONException 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.json.client.JSONException 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.json.client.JSONException 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