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