if (request.isAsyncStarted()) { request.getAsyncContext().complete();
public void complete (Session session, Request request) { if (request.isAsyncStarted() && request.getDispatcherType() == DispatcherType.REQUEST) { request.getAsyncContext().addListener(new SessionAsyncListener(session)); } else { complete(session); } //if dispatcher type is not async and not request, complete immediately (its a forward or an include) //else if dispatcher type is request and not async, complete immediately //else register an async callback completion listener that will complete the session }
if (baseRequest.isAsyncStarted() || !(DispatcherType.REQUEST.equals(type) || DispatcherType.ASYNC.equals(type)))
if (!baseRequest.isHandled() && !baseRequest.isAsyncStarted()) out.setInterceptor(orig_interceptor);
public void handle(HttpChannel channel) throws IOException, ServletException { final String target=channel.getRequest().getPathInfo(); final Request request=channel.getRequest(); final Response response=channel.getResponse(); if (LOG.isDebugEnabled()) LOG.debug("{} {} {} on {}", request.getDispatcherType(), request.getMethod(), target, channel); if (HttpMethod.OPTIONS.is(request.getMethod()) || "*".equals(target)) { if (!HttpMethod.OPTIONS.is(request.getMethod())) response.sendError(HttpStatus.BAD_REQUEST_400); handleOptions(request,response); if (!request.isHandled()) handle(target, request, request, response); } else handle(target, request, request, response); if (LOG.isDebugEnabled()) LOG.debug("handled={} async={} committed={} on {}", request.isHandled(),request.isAsyncStarted(),response.isCommitted(),channel); }
error_handler.handle(null, request, request, this); if (!request.isAsyncStarted()) closeOutput();
if (error && _request.isAsyncStarted()) _request.getAsyncContinuation().errorComplete();
if (error && _request.isAsyncStarted()) _request.getAsyncContinuation().errorComplete();
if (error && _request.isAsyncStarted()) _request.getAsyncContinuation().errorComplete();
if (error && _request.isAsyncStarted()) _request.getAsyncContinuation().errorComplete();