void asyncComplete() { if (isAsyncComplete) { throw new IllegalStateException("Request already released from asynchronous mode"); } isAsyncComplete = true; asyncStarted.set(false); if (asyncStartedThread != Thread.currentThread() || !asyncContext.isOkToConfigure()) { // it's not safe to just mark response as resumed request.getResponse().resume(); } else { final Response.SuspendedContextImpl suspendContext = (Response.SuspendedContextImpl) request.getResponse().getSuspendContext(); suspendContext.markResumed(); suspendContext.getSuspendStatus().reset(); } }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }
/** * Marks {@link Response} as resumed, but doesn't resume associated * {@link FilterChainContext} invocation. */ public synchronized boolean markResumed() { modCount++; if (suspendState != SuspendState.SUSPENDED) { if (suspendState == SuspendState.CANCELLED || suspendState == SuspendState.CANCELLING) { // Siletly return if processing has been cancelled return false; } throw new IllegalStateException("Not Suspended"); } suspendState = SuspendState.RESUMING; httpContext.getCloseable().removeCloseListener(closeListener); if (completionHandler != null) { completionHandler.completed(Response.this); } reset(); suspendState = SuspendState.RESUMED; HttpServerProbeNotifier.notifyRequestResume(request.httpServerFilter, ctx.getConnection(), request); return true; }