protected void doComplete() { asyncResponse.complete(); }
@Override public void close() { synchronized (lock) { closed = true; if (asyncContext.isSuspended()) { ResteasyAsynchronousResponse asyncResponse = asyncContext.getAsyncResponse(); if (asyncResponse != null) { asyncResponse.complete(); } } } }
private void writeException(Throwable t) { /* * Here we cannot call AsyncResponse.resume(t) because that would invoke the response filters * and we should not invoke them because we're already in them. */ HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); SynchronousDispatcher dispatcher = (SynchronousDispatcher) contextDataMap.get(Dispatcher.class); ResteasyAsynchronousResponse asyncResponse = request.getAsyncContext().getAsyncResponse(); RESTEasyTracingLogger tracingLogger = RESTEasyTracingLogger.getInstance(request); tracingLogger.flush(httpResponse.getOutputHeaders()); dispatcher.unhandledAsynchronousException(httpResponse, t); onComplete.accept(t); asyncResponse.complete(); asyncResponse.completionCallbacks(t); }
protected void doComplete() { asyncResponse.complete(); }
protected void doComplete() { asyncResponse.complete(); }
@Override public void close() { synchronized (lock) { closed = true; if (asyncContext.isSuspended()) { ResteasyAsynchronousResponse asyncResponse = asyncContext.getAsyncResponse(); if (asyncResponse != null) { asyncResponse.complete(); } } } }
@Override public void close() { synchronized (lock) { closed = true; if (asyncContext.isSuspended()) { ResteasyAsynchronousResponse asyncResponse = asyncContext.getAsyncResponse(); if (asyncResponse != null) { asyncResponse.complete(); } } } }
private void writeException(Throwable t) { /* * Here we cannot call AsyncResponse.resume(t) because that would invoke the response filters * and we should not invoke them because we're already in them. */ HttpResponse httpResponse = (HttpResponse) contextDataMap.get(HttpResponse.class); SynchronousDispatcher dispatcher = (SynchronousDispatcher) contextDataMap.get(Dispatcher.class); ResteasyAsynchronousResponse asyncResponse = request.getAsyncContext().getAsyncResponse(); RESTEasyTracingLogger tracingLogger = RESTEasyTracingLogger.getInstance(request); tracingLogger.flush(httpResponse.getOutputHeaders()); dispatcher.unhandledAsynchronousException(httpResponse, t); onComplete.accept(t); asyncResponse.complete(); asyncResponse.completionCallbacks(t); }