use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class SearchService method searchAll.
public Request searchAll(SearchAllRequest input, AsyncSuccess<SearchAllRequest, SearchAllResponse> onSuccess, AsyncFailure<SearchAllRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(SearchMethodSearchAll, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
SearchAllResponse outputParameter = new SearchAllResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(SearchService.this, SearchMethodSearchAll, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(SearchService.this, SearchMethodSearchAll, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(SearchService.this, SearchMethodSearchAll, input, exception);
}
});
onCallStart(SearchService.this, SearchMethodSearchAll, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(SearchService.this, SearchMethodSearchAll, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method changeUserAccess.
public Request changeUserAccess(ChangeUserAccessRequest input, AsyncSuccess<ChangeUserAccessRequest, ChangeUserAccessResponse> onSuccess, AsyncFailure<ChangeUserAccessRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodChangeUserAccess, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ChangeUserAccessResponse outputParameter = new ChangeUserAccessResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodChangeUserAccess, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
});
onCallStart(UserService.this, UserMethodChangeUserAccess, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodChangeUserAccess, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method blockUsers.
public Request blockUsers(BlockUsersRequest input, AsyncSuccess<BlockUsersRequest, BlockUsersResponse> onSuccess, AsyncFailure<BlockUsersRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodBlockUsers, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
BlockUsersResponse outputParameter = new BlockUsersResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodBlockUsers, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodBlockUsers, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodBlockUsers, input, exception);
}
});
onCallStart(UserService.this, UserMethodBlockUsers, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodBlockUsers, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method resetPassword.
public Request resetPassword(ResetPasswordRequest input, AsyncSuccess<ResetPasswordRequest, ResetPasswordResponse> onSuccess, AsyncFailure<ResetPasswordRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodResetPassword, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
ResetPasswordResponse outputParameter = new ResetPasswordResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodResetPassword, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
});
onCallStart(UserService.this, UserMethodResetPassword, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodResetPassword, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.Response in project blogwt by billy1380.
the class UserService method getEmailAvatar.
public Request getEmailAvatar(GetEmailAvatarRequest input, AsyncSuccess<GetEmailAvatarRequest, GetEmailAvatarResponse> onSuccess, AsyncFailure<GetEmailAvatarRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodGetEmailAvatar, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetEmailAvatarResponse outputParameter = new GetEmailAvatarResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodGetEmailAvatar, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
});
onCallStart(UserService.this, UserMethodGetEmailAvatar, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodGetEmailAvatar, input, exception);
}
return handle;
}
Aggregations