jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Updated InvocationCallback interface

From: Bill Burke <bburke_at_redhat.com>
Date: Thu, 25 Aug 2011 09:43:06 -0400

I don't understand why you need all this complexity. If the user needs
more control, then they should declare InvocationCallback to use an
HttpResponse.

As for error conditions, because onComplete() currently takes a Future
as a parameter, you could throw the same exceptions from Future.get() as
SyncInvoker throws.


i.e.

public class MyCallback implements InvocationCallback<Customer> {

    public void onComplete(Future<Customer> future) {

         try {
            Customer cust = future.get();

         } catch (InvocationException e) {...}

    }
}

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com