use of com.willshex.blogwt.shared.api.blog.call.GetArchiveEntriesResponse in project blogwt by billy1380.
the class BlogService method getArchiveEntries.
public Request getArchiveEntries(GetArchiveEntriesRequest input, AsyncSuccess<GetArchiveEntriesRequest, GetArchiveEntriesResponse> onSuccess, AsyncFailure<GetArchiveEntriesRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(BlogMethodGetArchiveEntries, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
GetArchiveEntriesResponse outputParameter = new GetArchiveEntriesResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(BlogService.this, BlogMethodGetArchiveEntries, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetArchiveEntries, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetArchiveEntries, input, exception);
}
});
onCallStart(BlogService.this, BlogMethodGetArchiveEntries, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(BlogService.this, BlogMethodGetArchiveEntries, input, exception);
}
return handle;
}
Aggregations