@Override
            public void consumeInformation(
                    final HttpResponse response,
                    final HttpContext context) throws HttpException, IOException {
                if (response.getCode() == HttpStatus.SC_SWITCHING_PROTOCOLS) {
                    final ProtocolVersion upgradeProtocol = protocolSwitchStrategy.switchProtocol(response);
                    if (upgradeProtocol == null || !upgradeProtocol.getProtocol().equals("TLS")) {
                        throw new ProtocolException("Failure switching protocols");
                    }
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("Switching to {}", upgradeProtocol);
                    }
                    execRuntime.upgradeTls(clientContext, new FutureCallback<AsyncExecRuntime>() {

                        @Override
                        public void completed(final AsyncExecRuntime result) {
                            LOG.debug("Successfully switched to {}", upgradeProtocol);
                        }

                        @Override
                        public void failed(final Exception ex) {
                            asyncExecCallback.failed(ex);
                        }

                        @Override
                        public void cancelled() {
                            asyncExecCallback.failed(new InterruptedIOException());
                        }

                    });
                } else {
                    asyncExecCallback.handleInformationResponse(response);
                }
            }
Usually the last HTTP/1.1 request execution handler in the asynchronous
request execution chain that is responsible for execution of
request/response exchanges with the opposite endpoint.

@since 5.0
httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/HttpAsyncMainClientExec.java