}
public Object inject(HttpRequest request, HttpResponse response)
{
final ResteasyAsynchronousContext asynchronousContext = request.getAsyncContext();
final ResteasyAsynchronousResponse asynchronousResponse = asynchronousContext.suspend(suspend);
ResourceMethodInvoker invoker = (ResourceMethodInvoker)request.getAttribute(ResourceMethodInvoker.class.getName());
invoker.initializeAsync(asynchronousResponse);
return new AsynchronousResponse()
{
@Override
public void setResponse(Response response)
{
asynchronousResponse.resume(response);
}
};
}