use of com.google.gwt.http.client.Response 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.Response 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.Response 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.http.client.Response 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.Response 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;
}
Aggregations