use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class BlogService method getTags.
public Request getTags(GetTagsRequest input, AsyncSuccess<GetTagsRequest, GetTagsResponse> onSuccess, AsyncFailure<GetTagsRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodGetTags, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetTagsResponse outputParameter = new GetTagsResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodGetTags, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetTags, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetTags, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodGetTags, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetTags, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException in project blogwt by billy1380.
the class BlogService method getProperties.
public Request getProperties(GetPropertiesRequest input, AsyncSuccess<GetPropertiesRequest, GetPropertiesResponse> onSuccess, AsyncFailure<GetPropertiesRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodGetProperties, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetPropertiesResponse outputParameter = new GetPropertiesResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodGetProperties, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetProperties, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetProperties, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodGetProperties, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetProperties, input, exception);
}
return handle;
}
use of com.google.gwt.http.client.RequestException 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.RequestException 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.RequestException 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;
}
Aggregations