@Test public void testForNonRetriableExceptions() throws Exception { RetryHandlerWrapper handler = new RetryHandlerWrapper(mock(RetryHandler.class)); assertThat(handler.retryRequest(mock(InterruptedIOException.class), 1, mock(HttpContext.class)), is(false)); assertThat(handler.retryRequest(mock(UnknownHostException.class), 1, mock(HttpContext.class)), is(false)); assertThat(handler.retryRequest(mock(ConnectException.class), 1, mock(HttpContext.class)), is(false)); assertThat(handler.retryRequest(mock(SSLException.class), 1, mock(HttpContext.class)), is(false)); }
@Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); @Override boolean retryRequest(
      final IOException exception,
      final int executionCount,
      final HttpContext context); }
RetryHandlerWrapper extends DefaultHttpRequestRetryHandler { @Override public boolean retryRequest( final IOException exception, final int executionCount, final HttpContext context) { return super.retryRequest(exception, executionCount, context) && retryHandler.retryRequest(exception, executionCount); } RetryHandlerWrapper(RetryHandler retryHandler); @Override boolean retryRequest(
      final IOException exception,
      final int executionCount,
      final HttpContext context);  }