static void bind(final HttpContext httpCtx, final HttpTransactionContext httpTxContext) { httpCtx.getCloseable().addCloseListener(httpTxContext.listener); REQUEST_STATE_ATTR.set(httpCtx, httpTxContext); }
private void cleanup(final HttpContext httpCtx) { httpCtx.getCloseable().removeCloseListener(listener); REQUEST_STATE_ATTR.remove(httpCtx); }
@Override public void completed(HttpTransactionContext context) { if (!context.isReuseConnection()) { final Connection c = (Connection) httpContext.getCloseable(); if (!httpContext.getRequest().getProcessingState().isStayAlive()) { if (notKeepAliveReason == null) { notKeepAliveReason = new IOException("HTTP keep-alive was disabled for this connection"); } c.closeWithReason(notKeepAliveReason); } else { final ConnectionManager cm = context.provider.getConnectionManager(); cm.returnConnection(c); } } } });
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
public void detach() { final OutputBuffer obLocal = outputBuffer; if (obLocal != null) { outputBuffer = null; // call in the current thread, because otherwise handler executed // in the different thread may deal with recycled Request/Response objects onError0(obLocal, obLocal.httpContext.getCloseable().isOpen() ? new CancellationException() : new EOFException()); } }
static void bind(final HttpContext httpCtx, final HttpTransactionContext httpTxContext) { httpCtx.getCloseable().addCloseListener(httpTxContext.listener); REQUEST_STATE_ATTR.set(httpCtx, httpTxContext); }
private void cleanup(final HttpContext httpCtx) { if (!skipCleanup) { httpCtx.getCloseable().removeCloseListener(listener); REQUEST_STATE_ATTR.remove(httpCtx); } }
static void bind(final HttpContext httpCtx, final HttpTransactionContext httpTxContext) { httpCtx.getCloseable().addCloseListener(httpTxContext.listener); REQUEST_STATE_ATTR.set(httpCtx, httpTxContext); }
private void cleanup(final HttpContext httpCtx) { if (!skipCleanup) { httpCtx.getCloseable().removeCloseListener(listener); REQUEST_STATE_ATTR.remove(httpCtx); } }
static void bind(final HttpContext httpCtx, final HttpTransactionContext httpTxContext) { httpCtx.getCloseable().addCloseListener(httpTxContext.listener); REQUEST_STATE_ATTR.set(httpCtx, httpTxContext); }
static void cleanupTransaction(final HttpContext httpCtx, final HttpTransactionContext httpTxContext) { httpCtx.getCloseable().removeCloseListener(httpTxContext.listener); REQUEST_STATE_ATTR.remove(httpCtx); }
@Override public void completed(HttpTransactionContext context) { if (!context.isReuseConnection()) { final Connection c = (Connection) httpContext.getCloseable(); if (!httpContext.getRequest().getProcessingState().isStayAlive()) { context.keepAliveDisabled(); } else { final ConnectionManager cm = context.provider.getConnectionManager(); cm.returnConnection(c); } } } });