JAX-RS 2.0 permits asynchronous generation of the output response in a manner that is similar to the Servlet 3.0 standard, in particular
javax.servlet.AsyncContext. In order to achieve this in a REST style resource, somehow the JAX-RS must be informed that the resource method can be executed in another thread internally to the provider. The client does not need to know the exact details of where the method is invoked under the hood.
In order to inform the JAX-RS runtime, that a resource method generates asynchronous output, supply the annotation
@javax.ws.rs.container.Suspended and also a new argument
@javax.ws.rs.container.AsyncResponse. Yes, there is another JAX-RS sub-package called