private void feederFlush0(final Connection c) { try { feeder.flush(); } catch (IOException ioe) { c.closeWithReason(ioe); } }
@Override public void onFailure(final Connection connection, final Throwable t) { connection.closeWithReason(Exceptions.makeIOException(t)); }
void timeout(final Connection c) { final HttpTransactionContext tx = HttpTransactionContext.currentTransaction(c); final TimeoutException te = new TimeoutException("Timeout exceeded"); if (tx != null) { tx.abort(te); } c.closeWithReason(new IOException("Timeout exceeded", te)); }
@Override public void onError(Throwable t) { c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(t)); }
private static void block(final Connection c, final FutureImpl<Boolean> future) { try { final long writeTimeout = c.getTransport().getWriteTimeout(MILLISECONDS); if (writeTimeout != -1) { future.get(writeTimeout, MILLISECONDS); } else { future.get(); } } catch (ExecutionException e) { c.closeWithReason(Exceptions.makeIOException(e.getCause())); } catch (Exception e) { c.closeWithReason(Exceptions.makeIOException(e)); } }
@Override public void ready() { try { flush(); } catch (IOException e) { final Connection c = feedableBodyGenerator.context.getConnection(); c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(e)); } }
@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); } } } });
@Override public void onFailure(final Connection connection, final Throwable t) { connection.closeWithReason(Exceptions.makeIOException(t)); }
private void feederFlush0(final Connection c) { try { feeder.flush(); } catch (IOException ioe) { c.closeWithReason(ioe); } }
private void feederFlush0(final Connection c) { try { feeder.flush(); } catch (IOException ioe) { c.closeWithReason(ioe); } }
private void feederFlush0(final Connection c) { try { feeder.flush(); } catch (IOException ioe) { c.closeWithReason(ioe); } }
@Override public void onFailure(final Connection connection, final Throwable t) { connection.closeWithReason(Exceptions.makeIOException(t)); }
void timeout(final Connection c) { final HttpTransactionContext tx = HttpTransactionContext.currentTransaction(c); final TimeoutException te = new TimeoutException("Timeout exceeded"); if (tx != null) { tx.abort(te); } c.closeWithReason(new IOException("Timeout exceeded", te)); }
void timeout(final Connection c) { final HttpTransactionContext tx = HttpTransactionContext.currentTransaction(c); final TimeoutException te = new TimeoutException("Timeout exceeded"); if (tx != null) { tx.abort(te); } c.closeWithReason(new IOException("Timeout exceeded", te)); }
@Override public void onError(Throwable t) { c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(t)); }
@Override public void onError(Throwable t) { c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(t)); }
@Override public void onError(Throwable t) { c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(t)); }
@Override public void ready() { try { flush(); } catch (IOException e) { final Connection c = feedableBodyGenerator.context.getConnection(); c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(e)); } }
@Override public void ready() { try { flush(); } catch (IOException e) { final Connection c = feedableBodyGenerator.context.getConnection(); c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(e)); } }
@Override public void ready() { try { flush(); } catch (IOException e) { final Connection c = feedableBodyGenerator.context.getConnection(); c.setMaxAsyncWriteQueueSize(feedableBodyGenerator.origMaxPendingBytes); c.closeWithReason(Exceptions.makeIOException(e)); } }