Hi all,

What is the best practice for handling async call response?
Below is what I do normally,

new AsyncHandler<MyResponse>() {
    @Override
    public void handleResponse(Response<MyResponse> res) {
        try {
            MyResponse v = res.get();
            // process v ...
        }catch (Exception e) {
            // log the exception
        }
    }
}

Do I need to check isCancelled() or isDone() before I call get()?

If the web service method is of type void, do I still need to call get()?
If I don't call get(), will I miss out any errors?
For example, exceptions are only thrown when get() is called.

Best regards,

David
                                          

Reply via email to