use of com.willshex.blogwt.shared.api.notification.call.UpdateMetaNotificationResponse 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;
}
Aggregations