You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2018/08/30 08:57:56 UTC

[2/2] httpcomponents-client git commit: Upgraded HttpCore dependency to version 5.0-beta3

Upgraded HttpCore dependency to version 5.0-beta3


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/1614c251
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/1614c251
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/1614c251

Branch: refs/heads/master
Commit: 1614c2516806780c80ddb94fc1414233da1e5da2
Parents: 3aa9c1f
Author: Oleg Kalnichevski <ol...@apache.org>
Authored: Thu Aug 30 10:36:11 2018 +0200
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Thu Aug 30 10:54:54 2018 +0200

----------------------------------------------------------------------
 httpclient5-cache/pom.xml                       |  3 +-
 .../http/impl/cache/AsyncCachingExec.java       | 22 +++----
 .../cache/DefaultAsyncCacheRevalidator.java     |  3 +-
 httpclient5-fluent/pom.xml                      |  3 +-
 httpclient5-testing/pom.xml                     |  3 +-
 .../AbstractSimpleServerExchangeHandler.java    |  4 +-
 .../client5/testing/async/AsyncEchoHandler.java |  4 +-
 .../testing/async/AsyncRandomHandler.java       |  2 +-
 .../async/AuthenticatingAsyncDecorator.java     |  4 +-
 .../async/AbstractHttp1IntegrationTestBase.java |  4 +-
 .../async/AbstractIntegrationTestBase.java      |  4 +-
 .../testing/sync/LocalServerTestBase.java       |  6 +-
 .../testing/sync/TestSSLSocketFactory.java      |  4 +-
 httpclient5-win/pom.xml                         |  5 +-
 httpclient5/pom.xml                             |  3 +-
 .../examples/AsyncClientAuthentication.java     |  4 +-
 .../examples/AsyncClientConnectionEviction.java |  4 +-
 .../http/examples/AsyncClientCustomSSL.java     |  4 +-
 .../examples/AsyncClientFullDuplexExchange.java | 20 ++++---
 .../examples/AsyncClientHttp1Pipelining.java    |  4 +-
 .../AsyncClientHttp2FullDuplexExchange.java     | 20 ++++---
 .../examples/AsyncClientHttp2Multiplexing.java  |  4 +-
 .../examples/AsyncClientHttp2ServerPush.java    |  4 +-
 .../http/examples/AsyncClientHttpExchange.java  |  4 +-
 .../AsyncClientHttpExchangeStreaming.java       |  4 +-
 .../http/examples/AsyncClientInterceptors.java  |  4 +-
 .../examples/AsyncClientMessageTrailers.java    |  4 +-
 .../http/examples/AsyncClientTlsAlpn.java       |  4 +-
 .../http/examples/ClientConfiguration.java      |  2 +-
 .../client5/http/async/AsyncExecCallback.java   |  4 +-
 .../async/methods/AbstractBinPushConsumer.java  |  4 +-
 .../methods/AbstractBinResponseConsumer.java    |  8 +++
 .../async/methods/AbstractCharPushConsumer.java |  4 +-
 .../methods/AbstractCharResponseConsumer.java   |  8 +++
 .../async/methods/SimpleResponseConsumer.java   |  8 +++
 .../impl/async/AbstractHttpAsyncClientBase.java | 10 ++--
 .../http/impl/async/AsyncConnectExec.java       |  6 +-
 .../http/impl/async/AsyncProtocolExec.java      |  3 +-
 .../impl/async/CloseableHttpAsyncClient.java    |  4 +-
 .../impl/async/Http2AsyncClientBuilder.java     |  5 +-
 .../Http2AsyncClientEventHandlerFactory.java    |  4 +-
 .../impl/async/Http2AsyncMainClientExec.java    | 12 ++--
 .../http/impl/async/HttpAsyncClientBuilder.java |  5 +-
 .../HttpAsyncClientEventHandlerFactory.java     |  4 +-
 .../impl/async/HttpAsyncMainClientExec.java     | 16 ++++--
 .../async/InternalAbstractHttpAsyncClient.java  |  7 ++-
 .../async/InternalHttp2AsyncExecRuntime.java    | 19 ++++---
 .../LoggingAsyncClientExchangeHandler.java      | 21 ++++---
 .../http/impl/async/LoggingIOSession.java       | 60 +++++++++++---------
 .../impl/async/MinimalHttp2AsyncClient.java     | 40 ++++++++-----
 .../http/impl/async/MinimalHttpAsyncClient.java | 33 +++++++----
 .../impl/classic/CloseableHttpResponse.java     |  8 +--
 .../http/impl/classic/InternalExecRuntime.java  |  4 +-
 .../http/impl/classic/MainClientExec.java       |  4 +-
 .../http/impl/classic/MinimalHttpClient.java    |  4 +-
 .../io/BasicHttpClientConnectionManager.java    | 30 +++++-----
 .../io/DefaultHttpClientConnectionOperator.java |  2 +-
 .../io/DefaultManagedHttpClientConnection.java  | 16 +++---
 .../io/PoolingHttpClientConnectionManager.java  | 24 ++++----
 ...olingHttpClientConnectionManagerBuilder.java |  2 +-
 .../DefaultManagedAsyncClientConnection.java    | 59 ++++++++++---------
 .../PoolingAsyncClientConnectionManager.java    | 33 +++++------
 .../hc/client5/http/io/ConnectionEndpoint.java  |  4 +-
 .../http/io/HttpClientConnectionManager.java    |  4 +-
 .../http/io/HttpClientConnectionOperator.java   |  2 +-
 .../http/nio/AsyncClientConnectionManager.java  |  4 +-
 .../hc/client5/http/ssl/H2TlsStrategy.java      | 14 ++---
 .../impl/classic/TestInternalExecRuntime.java   | 12 ++--
 .../TestBasicHttpClientConnectionManager.java   | 16 +++---
 .../io/TestHttpClientConnectionOperator.java    |  2 +-
 .../TestPoolingHttpClientConnectionManager.java |  2 +-
 pom.xml                                         |  2 +-
 72 files changed, 404 insertions(+), 289 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-cache/pom.xml
----------------------------------------------------------------------
diff --git a/httpclient5-cache/pom.xml b/httpclient5-cache/pom.xml
index 37d8fa6..283844e 100644
--- a/httpclient5-cache/pom.xml
+++ b/httpclient5-cache/pom.xml
@@ -137,7 +137,8 @@
           <source>${maven.compiler.source}</source>
           <links>
             <link>http://docs.oracle.com/javase/7/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5-h2/apidocs/</link>
             <link>http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/</link>
           </links>
         </configuration>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
index f45c1f2..2cb66f1 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/AsyncCachingExec.java
@@ -175,7 +175,8 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
 
         @Override
         public AsyncDataConsumer handleResponse(
-                final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+                final HttpResponse response,
+                final EntityDetails entityDetails) throws HttpException, IOException {
             return null;
         }
 
@@ -305,7 +306,8 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
 
             @Override
             public AsyncDataConsumer handleResponse(
-                    final HttpResponse backendResponse, final EntityDetails entityDetails) throws HttpException, IOException {
+                    final HttpResponse backendResponse,
+                    final EntityDetails entityDetails) throws HttpException, IOException {
                 final Date responseDate = getCurrentDate();
                 backendResponse.addHeader("Via", generateViaHeader(backendResponse));
 
@@ -342,7 +344,6 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
         private final AsyncExecCallback fallback;
         private final HttpResponse backendResponse;
         private final EntityDetails entityDetails;
-        private final Date responseDate;
         private final AtomicBoolean writtenThrough;
         private final AtomicReference<ByteArrayBuffer> bufferRef;
         private final AtomicReference<AsyncDataConsumer> dataConsumerRef;
@@ -350,11 +351,9 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
         CachingAsyncDataConsumer(
                 final AsyncExecCallback fallback,
                 final HttpResponse backendResponse,
-                final EntityDetails entityDetails,
-                final Date responseDate) {
+                final EntityDetails entityDetails) {
             this.fallback = fallback;
             this.backendResponse = backendResponse;
-            this.responseDate = responseDate;
             this.entityDetails = entityDetails;
             this.writtenThrough = new AtomicBoolean(false);
             this.bufferRef = new AtomicReference<>(entityDetails != null ? new ByteArrayBuffer(1024) : null);
@@ -475,7 +474,7 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
             });
             final boolean cacheable = responseCachingPolicy.isResponseCacheable(request, backendResponse);
             if (cacheable) {
-                cachingConsumerRef.set(new CachingAsyncDataConsumer(asyncExecCallback, backendResponse, entityDetails, responseDate));
+                cachingConsumerRef.set(new CachingAsyncDataConsumer(asyncExecCallback, backendResponse, entityDetails));
                 storeRequestIfModifiedSinceFor304Response(request, backendResponse);
             } else {
                 log.debug("Backend response is not cacheable");
@@ -764,7 +763,8 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
 
             @Override
             public AsyncDataConsumer handleResponse(
-                    final HttpResponse backendResponse1, final EntityDetails entityDetails) throws HttpException, IOException {
+                    final HttpResponse backendResponse1,
+                    final EntityDetails entityDetails) throws HttpException, IOException {
 
                 final Date responseDate1 = getCurrentDate();
 
@@ -783,7 +783,8 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
 
                                 @Override
                                 public AsyncDataConsumer handleResponse(
-                                        final HttpResponse backendResponse2, final EntityDetails entityDetails) throws HttpException, IOException {
+                                        final HttpResponse backendResponse2,
+                                        final EntityDetails entityDetails) throws HttpException, IOException {
                                     final Date responseDate2 = getCurrentDate();
                                     final AsyncExecCallback callback2 = evaluateResponse(backendResponse2, responseDate2);
                                     callbackRef.set(callback2);
@@ -966,7 +967,8 @@ public class AsyncCachingExec extends CachingExecBase implements AsyncExecChainH
 
             @Override
             public AsyncDataConsumer handleResponse(
-                    final HttpResponse backendResponse, final EntityDetails entityDetails) throws HttpException, IOException {
+                    final HttpResponse backendResponse,
+                    final EntityDetails entityDetails) throws HttpException, IOException {
                 final Date responseDate = getCurrentDate();
                 backendResponse.addHeader("Via", generateViaHeader(backendResponse));
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
index 446dc7a..7c9b4ea 100644
--- a/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
+++ b/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/DefaultAsyncCacheRevalidator.java
@@ -124,7 +124,8 @@ class DefaultAsyncCacheRevalidator extends CacheRevalidatorBase {
 
                                 @Override
                                 public AsyncDataConsumer handleResponse(
-                                        final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+                                        final HttpResponse response,
+                                        final EntityDetails entityDetails) throws HttpException, IOException {
                                     responseRef.set(response);
                                     return asyncExecCallback.handleResponse(response, entityDetails);
                                 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-fluent/pom.xml
----------------------------------------------------------------------
diff --git a/httpclient5-fluent/pom.xml b/httpclient5-fluent/pom.xml
index 271a35f..6c999f8 100644
--- a/httpclient5-fluent/pom.xml
+++ b/httpclient5-fluent/pom.xml
@@ -122,7 +122,8 @@
           <source>${maven.compiler.source}</source>
           <links>
             <link>http://docs.oracle.com/javase/7/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5-h2/apidocs/</link>
             <link>http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/</link>
           </links>
         </configuration>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/pom.xml
----------------------------------------------------------------------
diff --git a/httpclient5-testing/pom.xml b/httpclient5-testing/pom.xml
index c2cf522..bec30b5 100644
--- a/httpclient5-testing/pom.xml
+++ b/httpclient5-testing/pom.xml
@@ -106,7 +106,8 @@
           <source>${maven.compiler.source}</source>
           <links>
             <link>http://docs.oracle.com/javase/7/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5-h2/apidocs/</link>
             <link>http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/</link>
           </links>
         </configuration>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AbstractSimpleServerExchangeHandler.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AbstractSimpleServerExchangeHandler.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AbstractSimpleServerExchangeHandler.java
index a88b576..650cceb 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AbstractSimpleServerExchangeHandler.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AbstractSimpleServerExchangeHandler.java
@@ -32,6 +32,7 @@ import org.apache.hc.client5.http.async.methods.SimpleBody;
 import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
 import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
 import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.EntityDetails;
 import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.nio.AsyncEntityProducer;
@@ -53,6 +54,7 @@ public abstract class AbstractSimpleServerExchangeHandler extends AbstractServer
     @Override
     protected final AsyncRequestConsumer<SimpleHttpRequest> supplyConsumer(
             final HttpRequest request,
+            final EntityDetails entityDetails,
             final HttpContext context) throws HttpException {
         return new AbstractAsyncRequesterConsumer<SimpleHttpRequest, byte[]>(new BasicAsyncEntityConsumer()) {
 
@@ -88,7 +90,7 @@ public abstract class AbstractSimpleServerExchangeHandler extends AbstractServer
         } else {
             entityProducer = null;
         }
-        responseTrigger.submitResponse(new BasicResponseProducer(response, entityProducer));
+        responseTrigger.submitResponse(new BasicResponseProducer(response, entityProducer), context);
 
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncEchoHandler.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncEchoHandler.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncEchoHandler.java
index 03bc189..98affe3 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncEchoHandler.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncEchoHandler.java
@@ -96,7 +96,7 @@ public class AsyncEchoHandler implements AsyncServerExchangeHandler {
                     final BasicAsyncEntityProducer entityProducer = new BasicAsyncEntityProducer(content, contentType);
                     entityProducerRef.set(entityProducer);
                     try {
-                        responseChannel.sendResponse(new BasicHttpResponse(HttpStatus.SC_OK), entityProducer);
+                        responseChannel.sendResponse(new BasicHttpResponse(HttpStatus.SC_OK), entityProducer, context);
                     } catch (final IOException | HttpException ex) {
                         failed(ex);
                     }
@@ -114,7 +114,7 @@ public class AsyncEchoHandler implements AsyncServerExchangeHandler {
 
             });
         } else {
-            responseChannel.sendResponse(new BasicHttpResponse(HttpStatus.SC_OK), null);
+            responseChannel.sendResponse(new BasicHttpResponse(HttpStatus.SC_OK), null, context);
             entityConsumer.releaseResources();
         }
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
index 5a3135b..3f6d543 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AsyncRandomHandler.java
@@ -111,7 +111,7 @@ public class AsyncRandomHandler implements AsyncServerExchangeHandler {
             final HttpResponse response = new BasicHttpResponse(HttpStatus.SC_OK);
             final AsyncEntityProducer entityProducer = new RandomBinAsyncEntityProducer(n);
             entityProducerRef.set(entityProducer);
-            responseChannel.sendResponse(response, entityProducer);
+            responseChannel.sendResponse(response, entityProducer, context);
         } else {
             throw new ProtocolException("Invalid request path: " + path);
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AuthenticatingAsyncDecorator.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AuthenticatingAsyncDecorator.java b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AuthenticatingAsyncDecorator.java
index d9cd69c..2a8b5a4 100644
--- a/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AuthenticatingAsyncDecorator.java
+++ b/httpclient5-testing/src/main/java/org/apache/hc/client5/testing/async/AuthenticatingAsyncDecorator.java
@@ -89,7 +89,7 @@ public class AuthenticatingAsyncDecorator implements AsyncServerExchangeHandler
 
         if (authenticated) {
             if (expectContinue) {
-                responseChannel.sendInformation(new BasicClassicHttpResponse(HttpStatus.SC_CONTINUE));
+                responseChannel.sendInformation(new BasicClassicHttpResponse(HttpStatus.SC_CONTINUE), context);
             }
             exchangeHandler.handleRequest(request, entityDetails, responseChannel, context);
         } else {
@@ -103,7 +103,7 @@ public class AuthenticatingAsyncDecorator implements AsyncServerExchangeHandler
                     unauthorized,
                     new BasicAsyncEntityProducer("Unauthorized", ContentType.TEXT_PLAIN));
             responseProducerRef.set(responseProducer);
-            responseProducer.sendResponse(responseChannel);
+            responseProducer.sendResponse(responseChannel, context);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttp1IntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttp1IntegrationTestBase.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttp1IntegrationTestBase.java
index fc3252b..05e4da6 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttp1IntegrationTestBase.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractHttp1IntegrationTestBase.java
@@ -44,7 +44,7 @@ import org.apache.hc.core5.http.config.H1Config;
 import org.apache.hc.core5.http.impl.HttpProcessors;
 import org.apache.hc.core5.http.nio.AsyncServerExchangeHandler;
 import org.apache.hc.core5.http.protocol.HttpProcessor;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.ListenerEndpoint;
 import org.junit.Rule;
 import org.junit.rules.ExternalResource;
@@ -99,7 +99,7 @@ public abstract class AbstractHttp1IntegrationTestBase extends AbstractServerTes
         @Override
         protected void after() {
             if (httpclient != null) {
-                httpclient.shutdown(ShutdownType.GRACEFUL);
+                httpclient.shutdown(CloseMode.GRACEFUL);
                 httpclient = null;
             }
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractIntegrationTestBase.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractIntegrationTestBase.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractIntegrationTestBase.java
index c193785..808f5db 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractIntegrationTestBase.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/async/AbstractIntegrationTestBase.java
@@ -38,7 +38,7 @@ import org.apache.hc.core5.http.config.H1Config;
 import org.apache.hc.core5.http.nio.AsyncServerExchangeHandler;
 import org.apache.hc.core5.http.protocol.HttpProcessor;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.ListenerEndpoint;
 import org.junit.Rule;
 import org.junit.rules.ExternalResource;
@@ -63,7 +63,7 @@ public abstract class AbstractIntegrationTestBase<T extends CloseableHttpAsyncCl
         @Override
         protected void after() {
             if (httpclient != null) {
-                httpclient.shutdown(ShutdownType.GRACEFUL);
+                httpclient.shutdown(CloseMode.GRACEFUL);
                 httpclient = null;
             }
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
index f79bccb..ed0938b 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/LocalServerTestBase.java
@@ -40,10 +40,10 @@ import org.apache.hc.client5.testing.classic.RandomHandler;
 import org.apache.hc.core5.function.Decorator;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.URIScheme;
-import org.apache.hc.core5.http.config.SocketConfig;
 import org.apache.hc.core5.http.io.HttpServerRequestHandler;
+import org.apache.hc.core5.http.io.SocketConfig;
 import org.apache.hc.core5.http.protocol.HttpProcessor;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.testing.classic.ClassicTestServer;
 import org.apache.hc.core5.util.Timeout;
 import org.junit.Rule;
@@ -87,7 +87,7 @@ public abstract class LocalServerTestBase {
         protected void after() {
             if (server != null) {
                 try {
-                    server.shutdown(ShutdownType.IMMEDIATE);
+                    server.shutdown(CloseMode.IMMEDIATE);
                     server = null;
                 } catch (final Exception ignore) {
                 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java
index 51d16a0..4a946e8 100644
--- a/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java
+++ b/httpclient5-testing/src/test/java/org/apache/hc/client5/testing/sync/TestSSLSocketFactory.java
@@ -54,7 +54,7 @@ import org.apache.hc.core5.http.impl.bootstrap.SSLServerSetupHandler;
 import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
 import org.apache.hc.core5.http.protocol.BasicHttpContext;
 import org.apache.hc.core5.http.protocol.HttpContext;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.ssl.SSLContexts;
 import org.apache.hc.core5.ssl.TrustStrategy;
 import org.apache.hc.core5.util.TimeValue;
@@ -72,7 +72,7 @@ public class TestSSLSocketFactory {
     @After
     public void shutDown() throws Exception {
         if (this.server != null) {
-            this.server.shutdown(ShutdownType.GRACEFUL);
+            this.server.close(CloseMode.GRACEFUL);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5-win/pom.xml
----------------------------------------------------------------------
diff --git a/httpclient5-win/pom.xml b/httpclient5-win/pom.xml
index 3f60cf1..da3c1c0 100644
--- a/httpclient5-win/pom.xml
+++ b/httpclient5-win/pom.xml
@@ -92,8 +92,9 @@
           <quiet>true</quiet>
           <source>${maven.compiler.source}</source>
           <links>
-            <link>http://docs.oracle.com/javase/6/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://docs.oracle.com/javase/7/docs/api/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5-h2/apidocs/</link>
           </links>
         </configuration>
         <reportSets>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/pom.xml
----------------------------------------------------------------------
diff --git a/httpclient5/pom.xml b/httpclient5/pom.xml
index 1f6ca7f..dca207d 100644
--- a/httpclient5/pom.xml
+++ b/httpclient5/pom.xml
@@ -134,7 +134,8 @@
           <source>${maven.compiler.source}</source>
           <links>
             <link>http://docs.oracle.com/javase/7/docs/api/</link>
-            <link>http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5/apidocs/</link>
+            <link>http://hc.apache.org/httpcomponents-core-5.0.x/httpcore5-h2/apidocs/</link>
           </links>
         </configuration>
         <reportSets>

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientAuthentication.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientAuthentication.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientAuthentication.java
index ce96a5c..c3287d0 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientAuthentication.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientAuthentication.java
@@ -37,7 +37,7 @@ import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
 import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
 import org.apache.hc.client5.http.impl.auth.BasicCredentialsProvider;
 import org.apache.hc.core5.concurrent.FutureCallback;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 
 /**
  * A simple example that uses HttpClient to execute an HTTP request against
@@ -83,7 +83,7 @@ public class AsyncClientAuthentication {
         future.get();
 
         System.out.println("Shutting down");
-        httpclient.shutdown(ShutdownType.GRACEFUL);
+        httpclient.shutdown(CloseMode.GRACEFUL);
 
     }
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientConnectionEviction.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientConnectionEviction.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientConnectionEviction.java
index f53ef40..8f9d2cd 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientConnectionEviction.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientConnectionEviction.java
@@ -38,7 +38,7 @@ import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
 import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.TimeValue;
 import org.apache.hc.core5.util.Timeout;
@@ -121,7 +121,7 @@ public class AsyncClientConnectionEviction {
         future2.get();
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java
index cc8d2ff..8a92b71 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientCustomSSL.java
@@ -47,7 +47,7 @@ import org.apache.hc.client5.http.ssl.H2TlsStrategy;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.ssl.SSLContexts;
 import org.apache.hc.core5.ssl.TrustStrategy;
 
@@ -129,7 +129,7 @@ public class AsyncClientCustomSSL {
             future.get();
 
             System.out.println("Shutting down");
-            client.shutdown(ShutdownType.GRACEFUL);
+            client.shutdown(CloseMode.GRACEFUL);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java
index 47e612d..d2a7f7e 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientFullDuplexExchange.java
@@ -49,9 +49,10 @@ import org.apache.hc.core5.http.nio.DataStreamChannel;
 import org.apache.hc.core5.http.nio.RequestChannel;
 import org.apache.hc.core5.http.nio.entity.BasicAsyncEntityProducer;
 import org.apache.hc.core5.http.nio.entity.StringAsyncEntityConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -101,8 +102,8 @@ public class AsyncClientFullDuplexExchange {
             }
 
             @Override
-            public void produceRequest(final RequestChannel channel) throws HttpException, IOException {
-                requestProducer.sendRequest(channel);
+            public void produceRequest(final RequestChannel channel, final HttpContext context) throws HttpException, IOException {
+                requestProducer.sendRequest(channel, context);
             }
 
             @Override
@@ -116,14 +117,19 @@ public class AsyncClientFullDuplexExchange {
             }
 
             @Override
-            public void consumeInformation(final HttpResponse response) throws HttpException, IOException {
+            public void consumeInformation(
+                    final HttpResponse response,
+                    final HttpContext context) throws HttpException, IOException {
                 System.out.println(requestUri + "->" + response.getCode());
             }
 
             @Override
-            public void consumeResponse(final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+            public void consumeResponse(
+                    final HttpResponse response,
+                    final EntityDetails entityDetails,
+                    final HttpContext context) throws HttpException, IOException {
                 System.out.println(requestUri + "->" + response.getCode());
-                responseConsumer.consumeResponse(response, entityDetails, null);
+                responseConsumer.consumeResponse(response, entityDetails, context, null);
             }
 
             @Override
@@ -145,7 +151,7 @@ public class AsyncClientFullDuplexExchange {
         latch.await(1, TimeUnit.MINUTES);
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp1Pipelining.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp1Pipelining.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp1Pipelining.java
index 750d3c9..77afa34 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp1Pipelining.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp1Pipelining.java
@@ -42,7 +42,7 @@ import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.config.H1Config;
 import org.apache.hc.core5.http.nio.AsyncClientEndpoint;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -103,7 +103,7 @@ public class AsyncClientHttp1Pipelining {
         }
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
index 5df9ae0..e5cd96f 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2FullDuplexExchange.java
@@ -48,9 +48,10 @@ import org.apache.hc.core5.http.nio.DataStreamChannel;
 import org.apache.hc.core5.http.nio.RequestChannel;
 import org.apache.hc.core5.http.nio.entity.BasicAsyncEntityProducer;
 import org.apache.hc.core5.http.nio.entity.StringAsyncEntityConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -97,8 +98,8 @@ public class AsyncClientHttp2FullDuplexExchange {
             }
 
             @Override
-            public void produceRequest(final RequestChannel channel) throws HttpException, IOException {
-                requestProducer.sendRequest(channel);
+            public void produceRequest(final RequestChannel channel, final HttpContext context) throws HttpException, IOException {
+                requestProducer.sendRequest(channel, context);
             }
 
             @Override
@@ -112,14 +113,19 @@ public class AsyncClientHttp2FullDuplexExchange {
             }
 
             @Override
-            public void consumeInformation(final HttpResponse response) throws HttpException, IOException {
+            public void consumeInformation(
+                    final HttpResponse response,
+                    final HttpContext context) throws HttpException, IOException {
                 System.out.println(requestUri + "->" + response.getCode());
             }
 
             @Override
-            public void consumeResponse(final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+            public void consumeResponse(
+                    final HttpResponse response,
+                    final EntityDetails entityDetails,
+                    final HttpContext context) throws HttpException, IOException {
                 System.out.println(requestUri + "->" + response.getCode());
-                responseConsumer.consumeResponse(response, entityDetails, null);
+                responseConsumer.consumeResponse(response, entityDetails, context, null);
             }
 
             @Override
@@ -141,7 +147,7 @@ public class AsyncClientHttp2FullDuplexExchange {
         latch.await(1, TimeUnit.MINUTES);
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
index 02950e6..729ca18 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2Multiplexing.java
@@ -42,7 +42,7 @@ import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.AsyncClientEndpoint;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -104,7 +104,7 @@ public class AsyncClientHttp2Multiplexing {
         }
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
index ecf8d2b..cd1c7dd 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttp2ServerPush.java
@@ -46,7 +46,7 @@ import org.apache.hc.core5.http.message.StatusLine;
 import org.apache.hc.core5.http.nio.AsyncPushConsumer;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
 import org.apache.hc.core5.http2.config.H2Config;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -159,7 +159,7 @@ public class AsyncClientHttp2ServerPush {
         future.get();
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchange.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchange.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchange.java
index ea42d2d..9d4c212 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchange.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchange.java
@@ -35,7 +35,7 @@ import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
 import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -87,7 +87,7 @@ public class AsyncClientHttpExchange {
         }
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java
index 8f531be..52a5c17 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientHttpExchangeStreaming.java
@@ -39,7 +39,7 @@ import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.message.StatusLine;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -114,7 +114,7 @@ public class AsyncClientHttpExchangeStreaming {
         }
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java
index 53a24ed..50a19ab 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientInterceptors.java
@@ -56,7 +56,7 @@ import org.apache.hc.core5.http.message.BasicHttpResponse;
 import org.apache.hc.core5.http.nio.AsyncDataConsumer;
 import org.apache.hc.core5.http.nio.AsyncEntityProducer;
 import org.apache.hc.core5.http.protocol.HttpContext;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -150,7 +150,7 @@ public class AsyncClientInterceptors {
         }
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java
index 7da44f3..0563bbe 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientMessageTrailers.java
@@ -47,7 +47,7 @@ import org.apache.hc.core5.http.nio.AsyncEntityProducer;
 import org.apache.hc.core5.http.nio.AsyncRequestProducer;
 import org.apache.hc.core5.http.nio.entity.DigestingEntityProducer;
 import org.apache.hc.core5.http.nio.entity.StringAsyncEntityProducer;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.IOReactorConfig;
 import org.apache.hc.core5.util.Timeout;
 
@@ -116,7 +116,7 @@ public class AsyncClientMessageTrailers {
         future.get();
 
         System.out.println("Shutting down");
-        client.shutdown(ShutdownType.GRACEFUL);
+        client.shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java
index 917945e..8c06824 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java
@@ -45,7 +45,7 @@ import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.ssl.TlsStrategy;
 import org.apache.hc.core5.http2.HttpVersionPolicy;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.ssl.SSLContexts;
 
 /**
@@ -113,7 +113,7 @@ public class AsyncClientTlsAlpn {
             future.get();
 
             System.out.println("Shutting down");
-            client.shutdown(ShutdownType.GRACEFUL);
+            client.shutdown(CloseMode.GRACEFUL);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java b/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java
index f9dfc9c..0a282b5 100644
--- a/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java
+++ b/httpclient5/src/examples/org/apache/hc/client5/http/examples/ClientConfiguration.java
@@ -65,7 +65,6 @@ import org.apache.hc.core5.http.config.CharCodingConfig;
 import org.apache.hc.core5.http.config.H1Config;
 import org.apache.hc.core5.http.config.Registry;
 import org.apache.hc.core5.http.config.RegistryBuilder;
-import org.apache.hc.core5.http.config.SocketConfig;
 import org.apache.hc.core5.http.impl.io.DefaultClassicHttpResponseFactory;
 import org.apache.hc.core5.http.impl.io.DefaultHttpRequestWriterFactory;
 import org.apache.hc.core5.http.impl.io.DefaultHttpResponseParser;
@@ -74,6 +73,7 @@ import org.apache.hc.core5.http.io.HttpConnectionFactory;
 import org.apache.hc.core5.http.io.HttpMessageParser;
 import org.apache.hc.core5.http.io.HttpMessageParserFactory;
 import org.apache.hc.core5.http.io.HttpMessageWriterFactory;
+import org.apache.hc.core5.http.io.SocketConfig;
 import org.apache.hc.core5.http.io.entity.EntityUtils;
 import org.apache.hc.core5.http.message.BasicHeader;
 import org.apache.hc.core5.http.message.BasicLineParser;

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/AsyncExecCallback.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/AsyncExecCallback.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/AsyncExecCallback.java
index 120f225..dc75d6e 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/AsyncExecCallback.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/AsyncExecCallback.java
@@ -35,7 +35,9 @@ import org.apache.hc.core5.http.nio.AsyncDataConsumer;
 
 public interface AsyncExecCallback {
 
-    AsyncDataConsumer handleResponse(HttpResponse response, EntityDetails entityDetails) throws HttpException, IOException;
+    AsyncDataConsumer handleResponse(
+            HttpResponse response,
+            EntityDetails entityDetails) throws HttpException, IOException;
 
     void completed();
 

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinPushConsumer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinPushConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinPushConsumer.java
index b5d94d7..7f79fd9 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinPushConsumer.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinPushConsumer.java
@@ -37,6 +37,7 @@ import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.nio.AsyncPushConsumer;
 import org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public abstract class AbstractBinPushConsumer extends AbstractBinDataConsumer implements AsyncPushConsumer {
 
@@ -46,7 +47,8 @@ public abstract class AbstractBinPushConsumer extends AbstractBinDataConsumer im
     public final void consumePromise(
             final HttpRequest promise,
             final HttpResponse response,
-            final EntityDetails entityDetails) throws HttpException, IOException {
+            final EntityDetails entityDetails,
+            final HttpContext context) throws HttpException, IOException {
         if (entityDetails != null) {
             final ContentType contentType;
             try {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinResponseConsumer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinResponseConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinResponseConsumer.java
index b636114..b165c4f 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinResponseConsumer.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractBinResponseConsumer.java
@@ -37,6 +37,7 @@ import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
 import org.apache.hc.core5.http.nio.entity.AbstractBinDataConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public abstract class AbstractBinResponseConsumer<T> extends AbstractBinDataConsumer implements AsyncResponseConsumer<T> {
 
@@ -47,9 +48,16 @@ public abstract class AbstractBinResponseConsumer<T> extends AbstractBinDataCons
     protected abstract T buildResult();
 
     @Override
+    public void informationResponse(
+            final HttpResponse response,
+            final HttpContext context) throws HttpException, IOException {
+    }
+
+    @Override
     public final void consumeResponse(
             final HttpResponse response,
             final EntityDetails entityDetails,
+            final HttpContext context,
             final FutureCallback<T> resultCallback) throws HttpException, IOException {
         this.resultCallback = resultCallback;
         if (entityDetails != null) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharPushConsumer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharPushConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharPushConsumer.java
index a5b3552..899d5a8 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharPushConsumer.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharPushConsumer.java
@@ -39,6 +39,7 @@ import org.apache.hc.core5.http.HttpRequest;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.nio.AsyncPushConsumer;
 import org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public abstract class AbstractCharPushConsumer extends AbstractCharDataConsumer implements AsyncPushConsumer {
 
@@ -48,7 +49,8 @@ public abstract class AbstractCharPushConsumer extends AbstractCharDataConsumer
     public final void consumePromise(
             final HttpRequest promise,
             final HttpResponse response,
-            final EntityDetails entityDetails) throws HttpException, IOException {
+            final EntityDetails entityDetails,
+            final HttpContext context) throws HttpException, IOException {
         if (entityDetails != null) {
             final ContentType contentType;
             try {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharResponseConsumer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharResponseConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharResponseConsumer.java
index 93aacca..9dd5bfe 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharResponseConsumer.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/AbstractCharResponseConsumer.java
@@ -39,6 +39,7 @@ import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
 import org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public abstract class AbstractCharResponseConsumer<T> extends AbstractCharDataConsumer implements AsyncResponseConsumer<T> {
 
@@ -49,9 +50,16 @@ public abstract class AbstractCharResponseConsumer<T> extends AbstractCharDataCo
     protected abstract T buildResult() throws IOException;
 
     @Override
+    public void informationResponse(
+            final HttpResponse response,
+            final HttpContext context) throws HttpException, IOException {
+    }
+
+    @Override
     public final void consumeResponse(
             final HttpResponse response,
             final EntityDetails entityDetails,
+            final HttpContext context,
             final FutureCallback<T> resultCallback) throws HttpException, IOException {
         this.resultCallback = resultCallback;
         if (entityDetails != null) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java
index 395d1db..0b6aeed 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleResponseConsumer.java
@@ -26,11 +26,15 @@
  */
 package org.apache.hc.client5.http.async.methods;
 
+import java.io.IOException;
+
 import org.apache.hc.core5.http.ContentType;
+import org.apache.hc.core5.http.HttpException;
 import org.apache.hc.core5.http.HttpResponse;
 import org.apache.hc.core5.http.nio.AsyncEntityConsumer;
 import org.apache.hc.core5.http.nio.entity.BasicAsyncEntityConsumer;
 import org.apache.hc.core5.http.nio.support.AbstractAsyncResponseConsumer;
+import org.apache.hc.core5.http.protocol.HttpContext;
 
 public final class SimpleResponseConsumer extends AbstractAsyncResponseConsumer<SimpleHttpResponse, byte[]> {
 
@@ -43,6 +47,10 @@ public final class SimpleResponseConsumer extends AbstractAsyncResponseConsumer<
     }
 
     @Override
+    public void informationResponse(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
+    }
+
+    @Override
     protected SimpleHttpResponse buildResult(final HttpResponse response, final byte[] entity, final ContentType contentType) {
         final SimpleHttpResponse simpleResponse = SimpleHttpResponse.copy(response);
         if (entity != null) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AbstractHttpAsyncClientBase.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AbstractHttpAsyncClientBase.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AbstractHttpAsyncClientBase.java
index 8cf0793..3a18896 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AbstractHttpAsyncClientBase.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AbstractHttpAsyncClientBase.java
@@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.hc.core5.function.Supplier;
 import org.apache.hc.core5.http.nio.AsyncPushConsumer;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.ConnectionInitiator;
 import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
 import org.apache.hc.core5.reactor.ExceptionEvent;
@@ -120,17 +120,17 @@ abstract class AbstractHttpAsyncClientBase extends CloseableHttpAsyncClient {
     }
 
     @Override
-    public final void shutdown(final ShutdownType shutdownType) {
+    public final void shutdown(final CloseMode closeMode) {
         if (log.isDebugEnabled()) {
-            log.debug("Shutdown " + shutdownType);
+            log.debug("Shutdown " + closeMode);
         }
         ioReactor.initiateShutdown();
-        ioReactor.shutdown(shutdownType);
+        ioReactor.close(closeMode);
     }
 
     @Override
     public void close() {
-        shutdown(ShutdownType.GRACEFUL);
+        shutdown(CloseMode.GRACEFUL);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
index e82f273..577f44b 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncConnectExec.java
@@ -247,7 +247,8 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
 
                             @Override
                             public AsyncDataConsumer handleResponse(
-                                    final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+                                    final HttpResponse response,
+                                    final EntityDetails entityDetails) throws HttpException, IOException {
                                 return asyncExecCallback.handleResponse(response, entityDetails);
                             }
 
@@ -326,7 +327,8 @@ public final class AsyncConnectExec implements AsyncExecChainHandler {
 
             @Override
             public AsyncDataConsumer handleResponse(
-                    final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+                    final HttpResponse response,
+                    final EntityDetails entityDetails) throws HttpException, IOException {
 
                 clientContext.setAttribute(HttpCoreContext.HTTP_RESPONSE, response);
                 proxyHttpProcessor.process(response, entityDetails, clientContext);

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncProtocolExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncProtocolExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncProtocolExec.java
index be88033..1fa9a50 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncProtocolExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncProtocolExec.java
@@ -171,7 +171,8 @@ class AsyncProtocolExec implements AsyncExecChainHandler {
 
             @Override
             public AsyncDataConsumer handleResponse(
-                    final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+                    final HttpResponse response,
+                    final EntityDetails entityDetails) throws HttpException, IOException {
 
                 clientContext.setAttribute(HttpCoreContext.HTTP_RESPONSE, response);
                 httpProcessor.process(response, entityDetails, clientContext);

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java
index e153f21..2e82ee1 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/CloseableHttpAsyncClient.java
@@ -45,7 +45,7 @@ import org.apache.hc.core5.http.nio.AsyncPushConsumer;
 import org.apache.hc.core5.http.nio.AsyncRequestProducer;
 import org.apache.hc.core5.http.nio.AsyncResponseConsumer;
 import org.apache.hc.core5.http.protocol.HttpContext;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.reactor.ExceptionEvent;
 import org.apache.hc.core5.reactor.IOReactorStatus;
 import org.apache.hc.core5.util.Args;
@@ -69,7 +69,7 @@ public abstract class CloseableHttpAsyncClient implements HttpAsyncClient, Close
 
     public abstract void initiateShutdown();
 
-    public abstract void shutdown(ShutdownType shutdownType);
+    public abstract void shutdown(CloseMode closeMode);
 
     public final <T> Future<T> execute(
             final AsyncRequestProducer requestProducer,

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientBuilder.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientBuilder.java
index 1728709..fa26fac 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientBuilder.java
@@ -105,7 +105,8 @@ import org.apache.hc.core5.http2.nio.pool.H2ConnPool;
 import org.apache.hc.core5.http2.protocol.H2RequestConnControl;
 import org.apache.hc.core5.http2.protocol.H2RequestContent;
 import org.apache.hc.core5.http2.protocol.H2RequestTargetHost;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
+import org.apache.hc.core5.reactor.Command;
 import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
 import org.apache.hc.core5.reactor.IOEventHandlerFactory;
 import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -720,7 +721,7 @@ public class Http2AsyncClientBuilder {
 
                     @Override
                     public void execute(final IOSession ioSession) {
-                        ioSession.addFirst(new ShutdownCommand(ShutdownType.GRACEFUL));
+                        ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL), Command.Priority.IMMEDIATE);
                     }
 
                 });

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
index 2349de5..44c9dcd 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncClientEventHandlerFactory.java
@@ -47,7 +47,7 @@ import org.apache.hc.core5.http2.impl.nio.Http2OnlyClientProtocolNegotiator;
 import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
 import org.apache.hc.core5.reactor.IOEventHandler;
 import org.apache.hc.core5.reactor.IOEventHandlerFactory;
-import org.apache.hc.core5.reactor.TlsCapableIOSession;
+import org.apache.hc.core5.reactor.ProtocolIOSession;
 import org.apache.hc.core5.util.Args;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,7 +81,7 @@ class Http2AsyncClientEventHandlerFactory implements IOEventHandlerFactory {
     }
 
     @Override
-    public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
+    public IOEventHandler createHandler(final ProtocolIOSession ioSession, final Object attachment) {
         final Logger sessionLog = LoggerFactory.getLogger(ioSession.getClass());
         if (sessionLog.isDebugEnabled()
                 || wireLog.isDebugEnabled()

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
index 802e405..1d982e9 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/Http2AsyncMainClientExec.java
@@ -50,6 +50,7 @@ import org.apache.hc.core5.http.nio.AsyncEntityProducer;
 import org.apache.hc.core5.http.nio.CapacityChannel;
 import org.apache.hc.core5.http.nio.DataStreamChannel;
 import org.apache.hc.core5.http.nio.RequestChannel;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -97,8 +98,8 @@ class Http2AsyncMainClientExec implements AsyncExecChainHandler {
             }
 
             @Override
-            public void produceRequest(final RequestChannel channel) throws HttpException, IOException {
-                channel.sendRequest(request, entityProducer);
+            public void produceRequest(final RequestChannel channel, final HttpContext context) throws HttpException, IOException {
+                channel.sendRequest(request, entityProducer, context);
             }
 
             @Override
@@ -112,11 +113,14 @@ class Http2AsyncMainClientExec implements AsyncExecChainHandler {
             }
 
             @Override
-            public void consumeInformation(final HttpResponse response) throws HttpException, IOException {
+            public void consumeInformation(final HttpResponse response, final HttpContext context) throws HttpException, IOException {
             }
 
             @Override
-            public void consumeResponse(final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+            public void consumeResponse(
+                    final HttpResponse response,
+                    final EntityDetails entityDetails,
+                    final HttpContext context) throws HttpException, IOException {
                 entityConsumerRef.set(asyncExecCallback.handleResponse(response, entityDetails));
                 if (entityDetails == null) {
                     execRuntime.validateConnection();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
index e7316f9..525aa4a 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientBuilder.java
@@ -114,8 +114,9 @@ import org.apache.hc.core5.http2.config.H2Config;
 import org.apache.hc.core5.http2.protocol.H2RequestConnControl;
 import org.apache.hc.core5.http2.protocol.H2RequestContent;
 import org.apache.hc.core5.http2.protocol.H2RequestTargetHost;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
 import org.apache.hc.core5.pool.ConnPoolControl;
+import org.apache.hc.core5.reactor.Command;
 import org.apache.hc.core5.reactor.DefaultConnectingIOReactor;
 import org.apache.hc.core5.reactor.IOEventHandlerFactory;
 import org.apache.hc.core5.reactor.IOReactorConfig;
@@ -926,7 +927,7 @@ public class HttpAsyncClientBuilder {
 
                     @Override
                     public void execute(final IOSession ioSession) {
-                        ioSession.addFirst(new ShutdownCommand(ShutdownType.GRACEFUL));
+                        ioSession.enqueue(new ShutdownCommand(CloseMode.GRACEFUL), Command.Priority.IMMEDIATE);
                     }
 
                 });

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientEventHandlerFactory.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientEventHandlerFactory.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientEventHandlerFactory.java
index f0d2784..67f5086 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientEventHandlerFactory.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncClientEventHandlerFactory.java
@@ -62,7 +62,7 @@ import org.apache.hc.core5.http2.impl.nio.ClientHttpProtocolNegotiator;
 import org.apache.hc.core5.http2.impl.nio.Http2StreamListener;
 import org.apache.hc.core5.reactor.IOEventHandler;
 import org.apache.hc.core5.reactor.IOEventHandlerFactory;
-import org.apache.hc.core5.reactor.TlsCapableIOSession;
+import org.apache.hc.core5.reactor.ProtocolIOSession;
 import org.apache.hc.core5.util.Args;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -110,7 +110,7 @@ class HttpAsyncClientEventHandlerFactory implements IOEventHandlerFactory {
     }
 
     @Override
-    public IOEventHandler createHandler(final TlsCapableIOSession ioSession, final Object attachment) {
+    public IOEventHandler createHandler(final ProtocolIOSession ioSession, final Object attachment) {
         final Logger sessionLog = LoggerFactory.getLogger(ioSession.getClass());
         if (sessionLog.isDebugEnabled()
                 || streamLog.isDebugEnabled()

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java
index 1c8eabd..ff9556b 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java
@@ -55,6 +55,7 @@ import org.apache.hc.core5.http.nio.AsyncEntityProducer;
 import org.apache.hc.core5.http.nio.CapacityChannel;
 import org.apache.hc.core5.http.nio.DataStreamChannel;
 import org.apache.hc.core5.http.nio.RequestChannel;
+import org.apache.hc.core5.http.protocol.HttpContext;
 import org.apache.hc.core5.util.TimeValue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -113,8 +114,10 @@ class HttpAsyncMainClientExec implements AsyncExecChainHandler {
             }
 
             @Override
-            public void produceRequest(final RequestChannel channel) throws HttpException, IOException {
-                channel.sendRequest(request, entityProducer);
+            public void produceRequest(
+                    final RequestChannel channel,
+                    final HttpContext context) throws HttpException, IOException {
+                channel.sendRequest(request, entityProducer, context);
                 if (entityProducer == null) {
                     messageCountDown.decrementAndGet();
                 }
@@ -159,11 +162,16 @@ class HttpAsyncMainClientExec implements AsyncExecChainHandler {
             }
 
             @Override
-            public void consumeInformation(final HttpResponse response) throws HttpException, IOException {
+            public void consumeInformation(
+                    final HttpResponse response,
+                    final HttpContext context) throws HttpException, IOException {
             }
 
             @Override
-            public void consumeResponse(final HttpResponse response, final EntityDetails entityDetails) throws HttpException, IOException {
+            public void consumeResponse(
+                    final HttpResponse response,
+                    final EntityDetails entityDetails,
+                    final HttpContext context) throws HttpException, IOException {
                 entityConsumerRef.set(asyncExecCallback.handleResponse(response, entityDetails));
                 if (response.getCode() >= HttpStatus.SC_CLIENT_ERROR) {
                     messageCountDown.decrementAndGet();

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java
index 916aec0..cf93234 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java
@@ -146,7 +146,8 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
                 @Override
                 public void sendRequest(
                         final HttpRequest request,
-                        final EntityDetails entityDetails) throws HttpException, IOException {
+                        final EntityDetails entityDetails,
+                        final HttpContext context) throws HttpException, IOException {
 
                     RequestConfig requestConfig = null;
                     if (request instanceof Configurable) {
@@ -237,7 +238,7 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
                                         outputTerminated.set(true);
                                         requestProducer.releaseResources();
                                     }
-                                    responseConsumer.consumeResponse(response, entityDetails,
+                                    responseConsumer.consumeResponse(response, entityDetails, context,
                                             new FutureCallback<T>() {
 
                                                 @Override
@@ -293,7 +294,7 @@ abstract class InternalAbstractHttpAsyncClient extends AbstractHttpAsyncClientBa
                             });
                 }
 
-            });
+            }, context);
         } catch (final HttpException | IOException ex) {
             future.failed(ex);
         }

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/1614c251/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
----------------------------------------------------------------------
diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
index c589169..f5f3112 100644
--- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
+++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/InternalHttp2AsyncExecRuntime.java
@@ -41,9 +41,10 @@ import org.apache.hc.core5.concurrent.ComplexCancellable;
 import org.apache.hc.core5.concurrent.FutureCallback;
 import org.apache.hc.core5.http.HttpHost;
 import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler;
-import org.apache.hc.core5.http.nio.command.ExecutionCommand;
+import org.apache.hc.core5.http.nio.command.RequestExecutionCommand;
 import org.apache.hc.core5.http2.nio.pool.H2ConnPool;
-import org.apache.hc.core5.io.ShutdownType;
+import org.apache.hc.core5.io.CloseMode;
+import org.apache.hc.core5.reactor.Command;
 import org.apache.hc.core5.reactor.IOSession;
 import org.apache.hc.core5.util.TimeValue;
 import org.slf4j.Logger;
@@ -108,7 +109,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
     public void releaseConnection() {
         final Endpoint endpoint = sessionRef.getAndSet(null);
         if (endpoint != null && !reusable) {
-            endpoint.session.shutdown(ShutdownType.GRACEFUL);
+            endpoint.session.close(CloseMode.GRACEFUL);
         }
     }
 
@@ -116,7 +117,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
     public void discardConnection() {
         final Endpoint endpoint = sessionRef.getAndSet(null);
         if (endpoint != null) {
-            endpoint.session.shutdown(ShutdownType.GRACEFUL);
+            endpoint.session.close(CloseMode.GRACEFUL);
         }
     }
 
@@ -128,7 +129,7 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
         }
         final Endpoint endpoint = sessionRef.getAndSet(null);
         if (endpoint != null) {
-            endpoint.session.shutdown(ShutdownType.GRACEFUL);
+            endpoint.session.close(CloseMode.GRACEFUL);
         }
         return false;
     }
@@ -196,7 +197,9 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
             if (log.isDebugEnabled()) {
                 log.debug(ConnPoolSupport.getId(endpoint) + ": executing " + ConnPoolSupport.getId(exchangeHandler));
             }
-            session.addLast(new ExecutionCommand(exchangeHandler, complexCancellable, context));
+            session.enqueue(
+                    new RequestExecutionCommand(exchangeHandler, null, complexCancellable, context),
+                    Command.Priority.NORMAL);
         } else {
             final HttpHost target = endpoint.target;
             final RequestConfig requestConfig = context.getRequestConfig();
@@ -209,7 +212,9 @@ class InternalHttp2AsyncExecRuntime implements AsyncExecRuntime {
                     if (log.isDebugEnabled()) {
                         log.debug(ConnPoolSupport.getId(endpoint) + ": executing " + ConnPoolSupport.getId(exchangeHandler));
                     }
-                    session.addLast(new ExecutionCommand(exchangeHandler, complexCancellable, context));
+                    session.enqueue(
+                            new RequestExecutionCommand(exchangeHandler, null, complexCancellable, context),
+                            Command.Priority.NORMAL);
                 }
 
                 @Override