use of com.willshex.blogwt.shared.api.user.call.BlockUsersResponse 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