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

[jsr339-experts] Re: Updates to the JAX-RS async API

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Wed, 14 Mar 2012 13:35:42 +0100

Forgot to mention:

I am also thinking whether we should replace resume(Exception) with resume(Throwable). But I'm 50-50 on this one. Let me
know your preferences.

Marek

On 03/14/2012 01:28 PM, Marek Potociar wrote:
> Experts,
> please review the changes proposed in the async API that I juts pushed to the public code repository:
>
> http://java.net/projects/jax-rs-spec/sources/git/revision/ee9baeab1acbe8f16cdae025f16b75d8185a302e
>
> The changes I am proposing are meant to make the API easier to use and understand by the end users. Here's the summary:
>
> - declarative and programmatic suspend defined as exclusive (use either @Suspend or ExecutionContext.suspend(...), but
> not both)
> - new setSuspendTimeout(...) method added to the ExecutionContext (to compensate for the change above)
> - ExecutionContext.suspend(...) methods do not return Future<?> anymore
> - new isDone(), isSuspended(), isCancelled() methods added to the ExecutionContext (to compensate for the change above)
> - async example updated to match the new API
>
>
> Thank you,
> Marek