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

[jsr339-experts] Updated InvocationCallback interface

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Thu, 25 Aug 2011 15:12:01 +0200

Hello *,

I have pushed to our source repository a proposal for extending invocation callback interface:

http://java.net/projects/jax-rs-spec/sources/git/content/src/jax-rs-api/src/main/java/javax/ws/rs/client/InvocationCallback.java

I propose adding methods for handling exceptions, status code and headers as separate events, which would let users to
do some early decisions without a need to consume the response entity. BasicExamples.advancedAsyncCallback() illustrates
the intended usage:

http://java.net/projects/jax-rs-spec/sources/git/content/src/examples/src/main/java/jaxrs/examples/client/BasicExamples.java

Also, since the InvocationCallback interface grew in number of declared methods, I introduced the
AbstractInvocationCallback class to be used in simple scenarios that do not need to process the extra events:

http://java.net/projects/jax-rs-spec/sources/git/content/src/jax-rs-api/src/main/java/javax/ws/rs/client/AbstractInvocationCallback.java

Please, let me know if you have any feedback.

Thanks,
Marek