[jax-rs-spec users] [jsr339-experts] Re: AsyncResponse should be able to accept responses immediately

From: Sergey Beryozkin <>
Date: Mon, 1 Oct 2012 12:30:56 +0100

> Regarding returning boolean vs throwing an exception.
> I think it does not make a difference.
> This is because the runtime effectively guarantees that the application
> level code (original resource method accepting AsyncResponse or
> TimeoutHandler) does always see a 'suspended' AsyncResponse.
> However, after saying the above, I guess returning 'boolean' and
> updating the docs to simply say that say "resume(...) -> Resumes the
> suspended invocation, timeout(...) -> extends the suspended invocation,
> cancel(...) - cancels the suspended invocation" would probably be the
> right thing to do
After checking,

I think I favor IllegalStateException, the way things are done now,
because attempting to resume/cancel/timeout in the callback is an

Cheers, Sergey